File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -49,20 +49,25 @@ jobs:
4949 id : update
5050 run : git submodule update --remote --recursive
5151
52- - name : Run Git Status
53- id : status
54- run : echo "status='$(git status -s)'" >> $GITHUB_OUTPUT
52+ - name : Check if there are changes
53+ id : changes
54+ run : |
55+ if [ -n "$(git status -s)" ]; then
56+ echo "changed=true" >> $GITHUB_OUTPUT
57+ else
58+ echo "changed=false" >> $GITHUB_OUTPUT
59+ fi
5560
5661 - name : Add and commit files
57- if : ${{ steps.status .outputs.status != '' }}
62+ if : ${{ steps.changes .outputs.changed != 'true ' }}
5863 run : |
5964 git add .
6065 git config --global user.email "github-actions[bot]@users.noreply.github.com"
6166 git config --global user.name "github-actions[bot]"
6267 git commit -m "Update submodules at $(date "+DATE: %Y-%m-%d TIME: %H:%M:%S")"
6368
6469 - name : Push changes
65- if : ${{ steps.status .outputs.status != '' && github.event_name == 'push ' }}
70+ if : ${{ steps.changes .outputs.changed != 'true ' }}
6671 uses : ad-m/github-push-action@master
6772 with :
6873 github_token : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments