1- name : Autoformat
1+ name : autofix.ci # needed to securely identify the workflow by the action
22
33on :
4+ pull_request :
45 push :
6+ branches :
7+ - master
58
69jobs :
710 composer-normalize :
811 runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
914 steps :
1015 - uses : actions/checkout@v4
11- with :
12- ref : ${{ github.head_ref }}
1316
1417 - uses : shivammathur/setup-php@v2
1518 with :
@@ -21,17 +24,16 @@ jobs:
2124
2225 - run : composer normalize
2326
24- - uses : stefanzweifel/git-auto-commit- action@v5
27+ - uses : autofix-ci/ action@v1
2528 with :
26- commit_message : Normalize composer.json
29+ commit-message : Apply composer normalize changes
2730
2831 docs :
2932 runs-on : ubuntu-latest
33+ permissions :
34+ contents : read
3035 steps :
3136 - uses : actions/checkout@v4
32- with :
33- ref : ${{ github.head_ref }}
34- token : ${{ secrets.GA_PAT == '' && secrets.GA_PAT || secrets.GITHUB_TOKEN }}
3537
3638 - uses : shivammathur/setup-php@v2
3739 with :
@@ -43,23 +45,25 @@ jobs:
4345
4446 - run : composer docs
4547
48+ - run : npx prettier --write --tab-width=2 *.md **/*.md
49+
4650 - uses : creyD/prettier_action@v4.3
4751 with :
52+ dry : " true"
4853 prettier_options : --write --tab-width=2 *.md **/*.md
4954 commit_message : Prettify docs
5055
56+ - uses : autofix-ci/action@v1
57+ if : always()
58+ with :
59+ commit-message : Prettify docs
60+
5161 php-cs-fixer :
5262 runs-on : ubuntu-latest
53-
5463 permissions :
55- # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
56- contents : write
57-
64+ contents : read
5865 steps :
5966 - uses : actions/checkout@v4
60- with :
61- ref : ${{ github.head_ref }}
62- token : ${{ secrets.GA_PAT == '' && secrets.GA_PAT || secrets.GITHUB_TOKEN }}
6367
6468 - uses : shivammathur/setup-php@v2
6569 with :
7175
7276 - run : vendor/bin/php-cs-fixer fix
7377
74- - uses : stefanzweifel/git-auto-commit- action@v5
78+ - uses : autofix-ci/ action@v1
7579 with :
76- commit_message : Apply php-cs-fixer changes
80+ commit-message : Apply php-cs-fixer changes
0 commit comments