Skip to content

Commit 6febdeb

Browse files
added secret token to avoid 403
1 parent 435bc4c commit 6febdeb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ jobs:
2727
echo "]" >> subdirectories.json
2828
2929
- name: Commit and push
30+
env:
31+
TOKEN: ${{ secrets.SUBDIRECTORYFETCHINGTOKEN }}
3032
run: |
31-
git config user.name "github-actions[bot]"
32-
git config user.email "github-actions[bot]@users.noreply.github.com"
33+
git config user.name "Auto Commit Bot"
34+
git config user.email "[email protected]"
35+
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
3336
git add subdirectories.json
3437
git commit -m "Update subdirectories list" || echo "No changes"
35-
git push origin main # Explicitly push to the main branch
38+
git push origin main

0 commit comments

Comments
 (0)