From 02acf88f9dcf1f7d931d2193773b3c0235923054 Mon Sep 17 00:00:00 2001 From: tdejoigny-ledger Date: Wed, 13 Nov 2024 22:32:08 +0100 Subject: [PATCH] wip --- .github/workflows/nbgl_tests.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nbgl_tests.yml b/.github/workflows/nbgl_tests.yml index 6508023d..cd14dc0d 100644 --- a/.github/workflows/nbgl_tests.yml +++ b/.github/workflows/nbgl_tests.yml @@ -13,8 +13,22 @@ jobs: test-access: runs-on: ubuntu-latest env: - GITHUB_TOKEN: ${{ secrets.CI_BOT_USERNAME }} + GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} steps: + + + - name: Display token scopes + run: | + RESPONSE=$(curl -s -I -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/rate_limit) + SCOPES=$(echo "$RESPONSE" | grep "X-OAuth-Scopes" | sed 's/X-OAuth-Scopes: //') + echo "Token scopes: $SCOPES" + if [[ "$SCOPES" == *"repo"* ]] || [[ "$SCOPES" == *"public_repo"* ]]; then + echo "Token has the necessary permissions." + else + echo "Token does not have the necessary permissions." + exit 1 + fi + - name: Test access to app-nbgl repository run: | if gh issue list --repo LedgerHQ/app-nbgl-tests; then @@ -41,7 +55,7 @@ jobs: run_NBGL_tests: runs-on: ubuntu-latest env: - GITHUB_TOKEN: ${{ secrets.COMMON_READ_ORG }} + GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} steps: - name: Test access to app-ethereum repository run: |