Skip to content

Commit dc32869

Browse files
authored
ci: update push steps to use GITHUB_TOKEN for authentication (#239)
1 parent 04fe8dc commit dc32869

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,5 +242,9 @@ jobs:
242242
- name: Push changes
243243
working-directory: cpython/Doc/locales
244244
if: ${{ contains(fromJSON('["schedule", "workflow_dispatch"]'), github.event_name) }}
245+
env:
246+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
245247
run: |
248+
git remote set-url origin \
249+
"https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
246250
git push

.github/workflows/download-glossary.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ jobs:
6262
name: glossary
6363

6464
- name: Commit and push if changed
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6567
run: |
6668
git config user.name "github-actions"
6769
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
@@ -72,5 +74,7 @@ jobs:
7274
echo "No changes"
7375
else
7476
git commit -m "Auto-update glossary as of $(date +'%Y.%m.%d')"
77+
git remote set-url origin \
78+
"https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
7579
git push
7680
fi

0 commit comments

Comments
 (0)