Skip to content

Commit 1aee499

Browse files
committed
Fix workflow permissions for coverage report push
1 parent 6a4cd32 commit 1aee499

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/coverage-report.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
coverage:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
1315

1416
steps:
1517
- uses: actions/checkout@v4
@@ -27,13 +29,12 @@ jobs:
2729
run: |
2830
git config --local user.email "action@github.com"
2931
git config --local user.name "GitHub Action"
32+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
3033
git add README.md
3134
if ! git diff --staged --quiet; then
3235
git commit -m "Update coverage report [skip ci]"
3336
git push
3437
else
3538
echo "No changes to commit"
3639
fi
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3940

0 commit comments

Comments
 (0)