Rounak Bende commited on
fix: use PAT for CSV auto-update workflow (#14)
Browse filesGITHUB_TOKEN cannot bypass branch protection ruleset.
Use PAT_TOKEN secret (repo admin has bypass permission).
.github/workflows/update-csv.yml
CHANGED
|
@@ -15,7 +15,7 @@ jobs:
|
|
| 15 |
steps:
|
| 16 |
- uses: actions/checkout@v4
|
| 17 |
with:
|
| 18 |
-
|
| 19 |
|
| 20 |
- uses: actions/setup-python@v5
|
| 21 |
with:
|
|
@@ -28,11 +28,8 @@ jobs:
|
|
| 28 |
run: python src/results_to_csv.py
|
| 29 |
|
| 30 |
- name: Commit if changed
|
| 31 |
-
env:
|
| 32 |
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 33 |
run: |
|
| 34 |
git config user.name "github-actions[bot]"
|
| 35 |
git config user.email "github-actions[bot]@users.noreply.github.com"
|
| 36 |
-
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
|
| 37 |
git add results.csv
|
| 38 |
git diff --staged --quiet || (git commit -m "Auto-update results.csv" && git push)
|
|
|
|
| 15 |
steps:
|
| 16 |
- uses: actions/checkout@v4
|
| 17 |
with:
|
| 18 |
+
token: ${{ secrets.PAT_TOKEN }}
|
| 19 |
|
| 20 |
- uses: actions/setup-python@v5
|
| 21 |
with:
|
|
|
|
| 28 |
run: python src/results_to_csv.py
|
| 29 |
|
| 30 |
- name: Commit if changed
|
|
|
|
|
|
|
| 31 |
run: |
|
| 32 |
git config user.name "github-actions[bot]"
|
| 33 |
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
| 34 |
git add results.csv
|
| 35 |
git diff --staged --quiet || (git commit -m "Auto-update results.csv" && git push)
|