File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1212 - name : Checkout repo
1313 uses : actions/checkout@v3
1414 with :
15- persist-credentials : true
16- ref : main # Make sure to track the actual branch
15+ persist-credentials : false
1716
1817 - name : Generate subdirectories.json
1918 run : |
@@ -26,13 +25,13 @@ jobs:
2625 sed -i '$ s/,$//' subdirectories.json
2726 echo "]" >> subdirectories.json
2827
29- - name : Commit and push
28+ - name : Commit and push changes
3029 env :
3130 TOKEN : ${{ secrets.SUBDIRECTORYFETCHINGTOKEN }}
3231 run : |
33- git config user.name "Auto Commit Bot"
34- git config user.email "[email protected] " 32+ git config --global user.name "Auto Commit Bot"
33+ git config --global user.email "[email protected] " 3534 git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
3635 git add subdirectories.json
3736 git commit -m "Update subdirectories list" || echo "No changes"
38- git push origin main
37+ git push origin main || (echo "==== GIT PUSH FAILED ====" && git remote -v && git status && exit 1)
You can’t perform that action at this time.
0 commit comments