Skip to content

Commit aa31a6d

Browse files
Update generate-subdirectory-list.yml
1 parent 6febdeb commit aa31a6d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/generate-subdirectory-list.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ jobs:
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)

0 commit comments

Comments
 (0)