File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -24,26 +24,27 @@ jobs:
2424 - name : Install dependencies
2525 run : npm ci
2626
27- - name : Update contributors
28- run : npm run update-contributors
27+ - name : Update contributors and check for changes
28+ run : |
29+ npm run update-contributors
30+ if git diff --quiet README.md; then echo "changes=false" >> $GITHUB_OUTPUT; else echo "changes=true" >> $GITHUB_OUTPUT; fi
31+ id : check-changes
2932 env :
3033 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31-
32- - name : Check for changes
33- id : check-changes
34+
35+ - name : Stage changes
36+ if : steps. check-changes.outputs.changes == 'true'
3437 run : |
35- if [[ -n "$(git status --porcelain README.md)" ]]; then
36- echo "changes=true" >> $GITHUB_OUTPUT
37- else
38- echo "No changes to README.md"
39- fi
40-
38+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
39+ git config --local user.name "github-actions[bot]"
40+ git add README.md
41+ git commit -m "docs: update contributors list [skip ci]"
42+
4143 - name : Create Pull Request
4244 if : steps.check-changes.outputs.changes == 'true'
4345 uses : peter-evans/create-pull-request@v5
4446 with :
4547 token : ${{ secrets.GITHUB_TOKEN }}
46- commit-message : " docs: update contributors list"
4748 title : " Update contributors list"
4849 body : |
4950 Automated update of contributors list in README.md
You can’t perform that action at this time.
0 commit comments