Skip to content

Commit ffd417b

Browse files
committed
ci(docker): pin Docker actions to SHA per ASF allowlist policy
ASF tightened GitHub Actions enforcement on 2026-03-20, switching from "verified creators" to explicit allowlist only. Docker actions that worked implicitly now require SHA-pinned entries in apache/infrastructure-actions. Restore docker/setup-buildx-action (reverts shell workaround from ba8e865) and pin all Docker actions to approved commit SHAs. Allowlist PR: apache/infrastructure-actions#547
1 parent f762e4f commit ffd417b

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.github/actions/utils/docker-buildx/action.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,20 @@ runs:
130130
- name: Set up QEMU
131131
# Skip QEMU when building single platform on native runner (no emulation needed)
132132
if: inputs.platform == ''
133-
uses: docker/setup-qemu-action@v3
133+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
134134
with:
135135
platforms: all
136136

137137
- name: Set up Docker Buildx
138-
run: docker buildx create --use --driver-opt network=host --driver-opt image=moby/buildkit:latest
139-
shell: bash
138+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
139+
with:
140+
driver-opts: |
141+
network=host
142+
image=moby/buildkit:latest
140143
141144
- name: Login to Docker Hub
142145
if: steps.config.outputs.should_push == 'true'
143-
uses: docker/login-action@v3
146+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
144147
with:
145148
username: ${{ env.DOCKERHUB_USER }}
146149
password: ${{ env.DOCKERHUB_TOKEN }}
@@ -164,7 +167,7 @@ runs:
164167
165168
- name: Docker meta
166169
id: meta
167-
uses: docker/metadata-action@v5
170+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
168171
with:
169172
images: ${{ steps.config.outputs.image }}
170173
# Tags are only used for local builds (dry-run). Push mode always uses digest.
@@ -340,7 +343,7 @@ runs:
340343
- name: Build and push (by digest)
341344
id: build-push
342345
if: steps.config.outputs.should_push == 'true'
343-
uses: docker/build-push-action@v6
346+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
344347
with:
345348
context: ${{ steps.ctx.outputs.context }}
346349
file: ${{ steps.config.outputs.dockerfile }}
@@ -355,7 +358,7 @@ runs:
355358
- name: Build only (dry-run)
356359
id: build-only
357360
if: steps.config.outputs.should_push != 'true'
358-
uses: docker/build-push-action@v6
361+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
359362
with:
360363
context: ${{ steps.ctx.outputs.context }}
361364
file: ${{ steps.config.outputs.dockerfile }}

.github/workflows/_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
# Python SDK
7777
- name: Set up Docker Buildx for Python
7878
if: inputs.component == 'sdk-python' && inputs.task == 'test'
79-
run: docker buildx create --use
79+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
8080

8181
- name: Run Python SDK task
8282
if: inputs.component == 'sdk-python'

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,10 @@ jobs:
739739
path: ${{ runner.temp }}/digests
740740
741741
- name: Set up Docker Buildx
742-
run: docker buildx create --use
742+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
743743
744744
- name: Login to Docker Hub
745-
uses: docker/login-action@v3
745+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
746746
with:
747747
username: ${{ env.DOCKERHUB_USER }}
748748
password: ${{ env.DOCKERHUB_TOKEN }}

0 commit comments

Comments
 (0)