Skip to content

Commit 22da073

Browse files
authored
ci: add curl step to check GH_TOKEN permissions in workflow (#15)
1 parent 91778fb commit 22da073

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,9 @@ jobs:
6969
run: bumpver update --patch --commit
7070
- name: Push version bump commit
7171
run: |
72-
git push
72+
git push
73+
- name: Test GH_TOKEN permissions
74+
run: |
75+
curl -v -H "Authorization: token ${{ secrets.GH_TOKEN }}" \
76+
https://api.github.com/repos/${{ github.repository }}
77+
shell: bash

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ jobs:
5454
- name: Set up git for pushing
5555
run: |
5656
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git
57+
- name: Test GH_TOKEN permissions
58+
run: |
59+
curl -v -H "Authorization: token ${{ secrets.GH_TOKEN }}" \
60+
https://api.github.com/repos/${{ github.repository }}
61+
shell: bash
5762
- name: Set git user for GitHub Actions bot
5863
run: |
5964
git config user.name "github-actions[bot]"

0 commit comments

Comments
 (0)