Skip to content

Commit 02acf88

Browse files
wip
1 parent 3fa70ed commit 02acf88

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/nbgl_tests.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,22 @@ jobs:
1313
test-access:
1414
runs-on: ubuntu-latest
1515
env:
16-
GITHUB_TOKEN: ${{ secrets.CI_BOT_USERNAME }}
16+
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
1717
steps:
18+
19+
20+
- name: Display token scopes
21+
run: |
22+
RESPONSE=$(curl -s -I -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/rate_limit)
23+
SCOPES=$(echo "$RESPONSE" | grep "X-OAuth-Scopes" | sed 's/X-OAuth-Scopes: //')
24+
echo "Token scopes: $SCOPES"
25+
if [[ "$SCOPES" == *"repo"* ]] || [[ "$SCOPES" == *"public_repo"* ]]; then
26+
echo "Token has the necessary permissions."
27+
else
28+
echo "Token does not have the necessary permissions."
29+
exit 1
30+
fi
31+
1832
- name: Test access to app-nbgl repository
1933
run: |
2034
if gh issue list --repo LedgerHQ/app-nbgl-tests; then
@@ -41,7 +55,7 @@ jobs:
4155
run_NBGL_tests:
4256
runs-on: ubuntu-latest
4357
env:
44-
GITHUB_TOKEN: ${{ secrets.COMMON_READ_ORG }}
58+
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
4559
steps:
4660
- name: Test access to app-ethereum repository
4761
run: |

0 commit comments

Comments
 (0)