File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ci-astyle
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+ types : [opened]
7+ issue_comment :
8+ types : [created]
9+
10+ jobs :
11+ run :
12+ runs-on : ubuntu-latest
13+
14+ env :
15+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
16+ ISSUE_BODY : " ${{ github.event.issue.body }}"
17+
18+ steps :
19+ - name : Parse comment
20+ id : check
21+ if : github.event.issue.pull_request
22+ uses : SquisEat/pull-request-comment-trigger@1.0.1
23+ with :
24+ trigger : ' [ci-astyle]'
25+ reaction : rocket
26+
27+ - name : Install astyle
28+ if : steps.check.outputs.triggered == 'true'
29+ run : sudo apt-get install -y astyle
30+
31+ - name : Checkout code
32+ if : steps.check.outputs.triggered == 'true'
33+ uses : actions/checkout@v2
34+
35+ - name : Get all changed files
36+ if : steps.check.outputs.triggered == 'true'
37+ uses : jitterbit/get-changed-files@v1
38+
39+ - name : Run Astyle
40+ id : files
41+ if : steps.check.outputs.triggered == 'true'
42+ run : |
43+ astyle --project=tools/astyle/sofa.astyle ${{ steps.files.outputs.all }}
44+
45+ - name : Commit changes
46+ if : steps.check.outputs.triggered == 'true'
47+ uses : stefanzweifel/git-auto-commit-action@v2.3.0
48+ with :
49+ commit_message : CLEAN style (auto-commit by ci-astyle.yml)
50+ branch : ${{ github.head_ref }}
51+ env :
52+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+
You can’t perform that action at this time.
0 commit comments