Files
cocos-engine/.github/workflows/native-clang-format.yml
fish9167 de9ed24e78 ADD GitHub Action (#10173)
* ADD GitHub Action

使用私有机器进行编译(windows,Android)

* Update native_compile_self.yal

修改任务名称

* Update native-clang-format.yml

仓库地址修改
2022-02-25 10:49:54 +08:00

52 lines
1.5 KiB
YAML

name: <Native> Apply clang format
#on: [push, pull_request]
on:
pull_request_target:
types: [closed]
jobs:
Clang-Format:
if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ github.token }}
ref: ${{ github.head_sha }}
- id: get_change_files
uses: fish9167/file-changes-action@v1.2.3
with:
output: ' '
fileOutput: ' '
- name: Echo change files
run: |
cat $HOME/files.txt
mv $HOME/files.txt ${{github.workspace}}/files.txt
- uses: fish9167/clang-format-lint-action@master
with:
exclude: .clang-format-ignore
extensions: 'c,h,hpp,cpp,cxx'
style: file
inplace: True
- name: Create Pull Request
uses: fish9167/create-pull-request@v3
with:
title: '[ci skip][AUTO]: Automated PR to fix formatting'
body: |
Automated PR to fix formatting
committer: cocos-robot <cocos-robot@cocos.com>
author: cocos-robot <cocos-robot@cocos.com>
commit-message: "[ci skip][AUTO]: Automated clang-format update: ${{ github.event.pull_request.head.sha }} (#${{ github.event.number }})"
token: ${{ secrets.PR_TOKEN }}
push-to-fork: cocos-robot/engine
branch: t/bot/fix-format
branch-suffix: short-commit-hash
delete-branch: true
milestone: 1