Skip to content

Commit fb8c3f8

Browse files
committed
fix(ci): wire GITHUB_TOKEN into docker image builds
tools/install/_common.sh calls api.github.com unauthenticated to resolve each tool's latest-release asset URL. build-image.yaml and build-image-test.yaml passed GITHUB_TOKEN via buildx `secrets:`, but no Dockerfile RUN mounts that secret - dead config since #496, never reconnected when #947 added ARG-based auth to the Dockerfile. Result: every docker buildx build (PR test, nightly, release) hits ~10 unauthenticated GH API calls x up to 2 platforms. GitHub's 60/hr unauthenticated limit is shared across all Actions runners, so any call landing on the limit gets no asset match -> curl gets an empty URL -> exit 3. Observed here as tflint, but any GH-hosted tool install can trip it. Same class of bug as 65fe9e4 (reusable-tox.yml), different surface. Assisted-by: Sisyphus:claude-sonnet-5 opencode
1 parent 277e7cd commit fb8c3f8

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/build-image-test.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@ jobs:
6868
context: .
6969
build-args: |
7070
INSTALL_ALL=true
71+
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
7172
push: false
7273
load: true
7374
tags: ${{ env.IMAGE }}
7475
# Fix multi-platform: https://github.com/docker/buildx/issues/1533
7576
provenance: false
76-
secrets: |
77-
"github_token=${{ secrets.GITHUB_TOKEN }}"
7877

7978
- name: Setup Container Structure Tests
8079
if: steps.changed-files-specific.outputs.any_changed == 'true'
@@ -121,10 +120,9 @@ jobs:
121120
context: .
122121
build-args: |
123122
INSTALL_ALL=true
123+
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
124124
platforms: linux/amd64,linux/arm64
125125
push: false
126126
tags: ${{ env.IMAGE }}
127127
# Fix multi-platform: https://github.com/docker/buildx/issues/1533
128128
provenance: false
129-
secrets: |
130-
"github_token=${{ secrets.GITHUB_TOKEN }}"

.github/workflows/build-image.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,14 @@ jobs:
5858
context: .
5959
build-args: |
6060
INSTALL_ALL=true
61+
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
6162
platforms: linux/amd64,linux/arm64
6263
push: true
6364
tags: |
6465
${{ env.IMAGE_REPO }}:${{ env.IMAGE_TAG }}
6566
${{ env.IMAGE_REPO }}:latest
6667
# Fix multi-platform: https://github.com/docker/buildx/issues/1533
6768
provenance: false
68-
secrets: |
69-
"github_token=${{ secrets.GITHUB_TOKEN }}"
7069

7170
- name: Build and Push nightly
7271
if: github.event_name == 'schedule'
@@ -75,11 +74,10 @@ jobs:
7574
context: .
7675
build-args: |
7776
INSTALL_ALL=true
77+
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
7878
platforms: linux/amd64,linux/arm64
7979
push: true
8080
tags: |
8181
${{ env.IMAGE_REPO }}:nightly
8282
# Fix multi-platform: https://github.com/docker/buildx/issues/1533
8383
provenance: false
84-
secrets: |
85-
"github_token=${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)