Skip to content

Commit a8973f3

Browse files
committed
[SPARK-56126][INFRA][4.0] Sync docker-related GitHub Actions versions to the ASF approved patterns
### What changes were proposed in this pull request? This PR aims to sync `docker`-related GitHub Actions versions to the ASF approved patterns. ### Why are the changes needed? Currently, the `branch-4.0` CI is blocked by the ASF check because of the recent change. - https://github.com/apache/spark/actions/workflows/build_branch40_non_ansi.yml - https://github.com/apache/spark/actions/runs/23370475022 > The actions docker/login-actionv3, docker/setup-qemu-actionv3, docker/setup-buildx-actionv3, and docker/build-push-actionv6 are not allowed in apache/spark because all actions must be from a repository owned by your enterprise, created by GitHub, or match one of the patterns: This is due to the following change. - apache/infrastructure-actions#547 As of now, the updated patterns are the following. - https://github.com/apache/infrastructure-actions/blob/07f5f9d2b05fe0ec9886e3ef0a9d79797817f0cb/approved_patterns.yml#L100-L104 ``` - docker/build-push-action10e90e3645eae34f1e60eeb005ba3a3d33f178e8 - docker/login-actionc94ce9fb468520275223c153574b00df6fe4bcc9 - docker/metadata-actionc299e40c65443455700f0fdfc63efafe5b349051 - docker/setup-buildx-action8d2750c68a42422c14e847fe6c8ac0403b4cbd6f - docker/setup-qemu-action29109295f81e9208d7d86ff1c6c12d2833863392 ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually check like the following because the updated CI should be triggered manually. ``` $ git grep 'uses: docker' | sort | uniq -c 5 .github/workflows/build_and_test.yml: uses: docker/build-push-action10e90e3645eae34f1e60eeb005ba3a3d33f178e8 1 .github/workflows/build_and_test.yml: uses: docker/login-actionc94ce9fb468520275223c153574b00df6fe4bcc9 1 .github/workflows/build_and_test.yml: uses: docker/setup-buildx-action8d2750c68a42422c14e847fe6c8ac0403b4cbd6f 1 .github/workflows/build_and_test.yml: uses: docker/setup-qemu-action29109295f81e9208d7d86ff1c6c12d2833863392 12 .github/workflows/build_infra_images_cache.yml: uses: docker/build-push-action10e90e3645eae34f1e60eeb005ba3a3d33f178e8 1 .github/workflows/build_infra_images_cache.yml: uses: docker/login-actionc94ce9fb468520275223c153574b00df6fe4bcc9 1 .github/workflows/build_infra_images_cache.yml: uses: docker/setup-buildx-action8d2750c68a42422c14e847fe6c8ac0403b4cbd6f 1 .github/workflows/build_infra_images_cache.yml: uses: docker/setup-qemu-action29109295f81e9208d7d86ff1c6c12d2833863392 ``` ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-4-6) Closes #54937 from dongjoon-hyun/dongjoon/hopeful-kepler. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 857b525 commit a8973f3

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ jobs:
404404
packages: write
405405
steps:
406406
- name: Login to GitHub Container Registry
407-
uses: docker/login-action@v3
407+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
408408
with:
409409
registry: ghcr.io
410410
username: ${{ github.actor }}
@@ -424,13 +424,13 @@ jobs:
424424
git -c user.name='Apache Spark Test Account' -c user.email='sparktestacc@gmail.com' merge --no-commit --progress --squash FETCH_HEAD
425425
git -c user.name='Apache Spark Test Account' -c user.email='sparktestacc@gmail.com' commit -m "Merged commit" --allow-empty
426426
- name: Set up QEMU
427-
uses: docker/setup-qemu-action@v3
427+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
428428
- name: Set up Docker Buildx
429-
uses: docker/setup-buildx-action@v3
429+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
430430
- name: Build and push for branch-3.5
431431
if: inputs.branch == 'branch-3.5'
432432
id: docker_build
433-
uses: docker/build-push-action@v6
433+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
434434
with:
435435
context: ./dev/infra/
436436
push: true
@@ -441,7 +441,7 @@ jobs:
441441
- name: Build and push (Documentation)
442442
if: ${{ inputs.branch != 'branch-3.5' && fromJson(needs.precondition.outputs.required).docs == 'true' && hashFiles('dev/spark-test-image/docs/Dockerfile') != '' }}
443443
id: docker_build_docs
444-
uses: docker/build-push-action@v6
444+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
445445
with:
446446
context: ./dev/spark-test-image/docs/
447447
push: true
@@ -452,7 +452,7 @@ jobs:
452452
- name: Build and push (Linter)
453453
if: ${{ inputs.branch != 'branch-3.5' && fromJson(needs.precondition.outputs.required).lint == 'true' && hashFiles('dev/spark-test-image/lint/Dockerfile') != '' }}
454454
id: docker_build_lint
455-
uses: docker/build-push-action@v6
455+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
456456
with:
457457
context: ./dev/spark-test-image/lint/
458458
push: true
@@ -463,7 +463,7 @@ jobs:
463463
- name: Build and push (SparkR)
464464
if: ${{ inputs.branch != 'branch-3.5' && fromJson(needs.precondition.outputs.required).sparkr == 'true' && hashFiles('dev/spark-test-image/sparkr/Dockerfile') != '' }}
465465
id: docker_build_sparkr
466-
uses: docker/build-push-action@v6
466+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
467467
with:
468468
context: ./dev/spark-test-image/sparkr/
469469
push: true
@@ -475,7 +475,7 @@ jobs:
475475
if: ${{ inputs.branch != 'branch-3.5' && (fromJson(needs.precondition.outputs.required).pyspark == 'true' || fromJson(needs.precondition.outputs.required).pyspark-pandas == 'true') && env.PYSPARK_IMAGE_TO_TEST != '' }}
476476
id: docker_build_pyspark
477477
env: ${{ fromJSON(inputs.envs) }}
478-
uses: docker/build-push-action@v6
478+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
479479
with:
480480
context: ./dev/spark-test-image/${{ env.PYSPARK_IMAGE_TO_TEST }}/
481481
push: true

.github/workflows/build_infra_images_cache.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ jobs:
5050
- name: Checkout Spark repository
5151
uses: actions/checkout@v4
5252
- name: Set up QEMU
53-
uses: docker/setup-qemu-action@v3
53+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
5454
- name: Set up Docker Buildx
55-
uses: docker/setup-buildx-action@v3
55+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
5656
- name: Login to DockerHub
57-
uses: docker/login-action@v3
57+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
5858
with:
5959
registry: ghcr.io
6060
username: ${{ github.actor }}
6161
password: ${{ secrets.GITHUB_TOKEN }}
6262
- name: Build and push
6363
id: docker_build
64-
uses: docker/build-push-action@v6
64+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
6565
with:
6666
context: ./dev/infra/
6767
push: true
@@ -73,7 +73,7 @@ jobs:
7373
- name: Build and push (Documentation)
7474
if: hashFiles('dev/spark-test-image/docs/Dockerfile') != ''
7575
id: docker_build_docs
76-
uses: docker/build-push-action@v6
76+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
7777
with:
7878
context: ./dev/spark-test-image/docs/
7979
push: true
@@ -86,7 +86,7 @@ jobs:
8686
- name: Build and push (Linter)
8787
if: hashFiles('dev/spark-test-image/lint/Dockerfile') != ''
8888
id: docker_build_lint
89-
uses: docker/build-push-action@v6
89+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
9090
with:
9191
context: ./dev/spark-test-image/lint/
9292
push: true
@@ -99,7 +99,7 @@ jobs:
9999
- name: Build and push (SparkR)
100100
if: hashFiles('dev/spark-test-image/sparkr/Dockerfile') != ''
101101
id: docker_build_sparkr
102-
uses: docker/build-push-action@v6
102+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
103103
with:
104104
context: ./dev/spark-test-image/sparkr/
105105
push: true
@@ -112,7 +112,7 @@ jobs:
112112
- name: Build and push (PySpark with old dependencies)
113113
if: hashFiles('dev/spark-test-image/python-minimum/Dockerfile') != ''
114114
id: docker_build_pyspark_python_minimum
115-
uses: docker/build-push-action@v6
115+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
116116
with:
117117
context: ./dev/spark-test-image/python-minimum/
118118
push: true
@@ -125,7 +125,7 @@ jobs:
125125
- name: Build and push (PySpark PS with old dependencies)
126126
if: hashFiles('dev/spark-test-image/python-ps-minimum/Dockerfile') != ''
127127
id: docker_build_pyspark_python_ps_minimum
128-
uses: docker/build-push-action@v6
128+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
129129
with:
130130
context: ./dev/spark-test-image/python-ps-minimum/
131131
push: true
@@ -138,7 +138,7 @@ jobs:
138138
- name: Build and push (PySpark with PyPy 3.10)
139139
if: hashFiles('dev/spark-test-image/pypy-310/Dockerfile') != ''
140140
id: docker_build_pyspark_pypy_310
141-
uses: docker/build-push-action@v6
141+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
142142
with:
143143
context: ./dev/spark-test-image/pypy-310/
144144
push: true
@@ -151,7 +151,7 @@ jobs:
151151
- name: Build and push (PySpark with Python 3.9)
152152
if: hashFiles('dev/spark-test-image/python-309/Dockerfile') != ''
153153
id: docker_build_pyspark_python_309
154-
uses: docker/build-push-action@v6
154+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
155155
with:
156156
context: ./dev/spark-test-image/python-309/
157157
push: true
@@ -164,7 +164,7 @@ jobs:
164164
- name: Build and push (PySpark with Python 3.10)
165165
if: hashFiles('dev/spark-test-image/python-310/Dockerfile') != ''
166166
id: docker_build_pyspark_python_310
167-
uses: docker/build-push-action@v6
167+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
168168
with:
169169
context: ./dev/spark-test-image/python-310/
170170
push: true
@@ -177,7 +177,7 @@ jobs:
177177
- name: Build and push (PySpark with Python 3.11)
178178
if: hashFiles('dev/spark-test-image/python-311/Dockerfile') != ''
179179
id: docker_build_pyspark_python_311
180-
uses: docker/build-push-action@v6
180+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
181181
with:
182182
context: ./dev/spark-test-image/python-311/
183183
push: true
@@ -190,7 +190,7 @@ jobs:
190190
- name: Build and push (PySpark with Python 3.12)
191191
if: hashFiles('dev/spark-test-image/python-312/Dockerfile') != ''
192192
id: docker_build_pyspark_python_312
193-
uses: docker/build-push-action@v6
193+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
194194
with:
195195
context: ./dev/spark-test-image/python-312/
196196
push: true
@@ -203,7 +203,7 @@ jobs:
203203
- name: Build and push (PySpark with Python 3.13)
204204
if: hashFiles('dev/spark-test-image/python-313/Dockerfile') != ''
205205
id: docker_build_pyspark_python_313
206-
uses: docker/build-push-action@v6
206+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
207207
with:
208208
context: ./dev/spark-test-image/python-313/
209209
push: true

0 commit comments

Comments
 (0)