File tree Expand file tree Collapse file tree 1 file changed +7
-27
lines changed
Expand file tree Collapse file tree 1 file changed +7
-27
lines changed Original file line number Diff line number Diff line change 1010jobs :
1111 clean :
1212 runs-on : ubuntu-latest
13+ permissions :
14+ # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
15+ contents : write
1316
1417 steps :
1518 - uses : actions/checkout@v4
3740 SPONSORKIT_OPENCOLLECTIVE_SLUG : ${{ secrets.SPONSORKIT_OPENCOLLECTIVE_SLUG }}
3841 SPONSORKIT_OPENCOLLECTIVE_KEY : ${{ secrets.SPONSORKIT_OPENCOLLECTIVE_KEY }}
3942
40- - name : Check for changes
41- id : check-changes
42- run : |
43- echo "Current working directory:"
44- pwd
45- echo "Files in current directory:"
46- ls -la
47- echo "Git status output:"
48- git status --porcelain
49- echo "All git status (including untracked):"
50- git status --porcelain --untracked-files=all
51- if [[ -n "$(git status --porcelain --untracked-files=all)" ]]; then
52- echo "changes=true" >> $GITHUB_OUTPUT
53- echo "Changes detected!"
54- else
55- echo "changes=false" >> $GITHUB_OUTPUT
56- echo "No changes detected"
57- fi
58-
59- - name : Commit and push if changed
60- if : steps.check-changes.outputs.changes == 'true'
61- run : |
62- git config --global user.name 'github-actions[bot]'
63- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
64- git add -A
65- git commit -m "chore: generate definition file [skip ci]"
66- git push
43+ - name : Git Auto Commit
44+ uses : EndBug/add-and-commit@v9
45+ with :
46+ message : " chore: update generated files"
You can’t perform that action at this time.
0 commit comments