Skip to content

Commit 8c62726

Browse files
committed
Fix crd-size workflow: set GH_TOKEN for gh api call
The "Compute CRD JSON size" step uses `gh api` to fetch the PR head's CRD file, but did not set GH_TOKEN. gh requires GH_TOKEN in Actions and exited with code 4 before producing output, failing the check. Add GH_TOKEN: ${{ github.token }} to the step env. The existing `contents: read` permission is sufficient for the contents API read. Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent 32d37f4 commit 8c62726

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎.github/workflows/crd-size-badge.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- name: Compute CRD JSON size
3131
id: size
3232
env:
33+
GH_TOKEN: ${{ github.token }}
3334
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
3435
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
3536
run: |

0 commit comments

Comments
 (0)