Skip to content

Commit 527208d

Browse files
Michael HallikMichael Hallik
Michael Hallik
authored and
Michael Hallik
committed
Add GITHUB_TOKEN to securely authenticate and push changes.
1 parent 5da988c commit 527208d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/update_pepy_badge.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ jobs:
2626
run: python fetch_pepy_downloads.py
2727

2828
- name: Commit and push badge
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2931
run: |
3032
git config user.name github-actions
3133
git config user.email [email protected]
3234
git add badge_pepy_downloads.svg
33-
git commit -m "Update Pepy downloads badge"
34-
git push
35+
git commit -m "Update Pepy downloads badge" || echo "No changes to commit"
36+
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }} HEAD:main

0 commit comments

Comments
 (0)