File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1212 - name : Checkout repo
1313 uses : actions/checkout@v4
1414 with :
15- fetch-depth : 0 # ensures full history for commits
15+ fetch-depth : 0
16+ persist-credentials : true
1617
1718 - name : Get latest release info
1819 id : release
3132 - name : Run rename/move script
3233 run : |
3334 chmod +x ./scripts/rename.sh
34- # Make sure the folder exists
3535 mkdir -p ./processed
3636 ./scripts/rename.sh ./upstream-release ./processed
3737
@@ -41,12 +41,16 @@ jobs:
4141
4242 - name : Commit and push
4343 run : |
44- cd $GITHUB_WORKSPACE
4544 git config user.name "github-actions"
4645 git config user.email "[email protected] " 47- git add .
48- git commit -m "Update to ${{ steps.release.outputs.tag }}" || echo "No changes to commit"
49- git push origin main
46+ # Only commit if there are changes
47+ if [ -n "$(git status --porcelain)" ]; then
48+ git add .
49+ git commit -m "Update to ${{ steps.release.outputs.tag }}"
50+ git push origin main
51+ else
52+ echo "No changes to commit"
53+ fi
5054
5155 - name : Notify via GitHub issue
5256 uses : peter-evans/create-issue-from-file@v5
You can’t perform that action at this time.
0 commit comments