This is an automated email from the ASF dual-hosted git repository.
ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new f6f6dae726e5 [SPARK-50590][INFRA] Skip uncessary image build and push
f6f6dae726e5 is described below
commit f6f6dae726e5c5125baab5bb6a73535fa1494dfd
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Mon Dec 23 09:51:25 2024 +0800
[SPARK-50590][INFRA] Skip uncessary image build and push
### What changes were proposed in this pull request?
Skip uncessary image build and push
### Why are the changes needed?
for master, the build of `./dev/infra/` is not needed;
for branch-3.5, the build of new images is not needed;
skip those steps by branch, to make sure right images are used
### Does this PR introduce _any_ user-facing change?
no, infra-only
### How was this patch tested?
ci
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #49204 from zhengruifeng/infra_avoid_build.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
---
.github/workflows/build_and_test.yml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build_and_test.yml
b/.github/workflows/build_and_test.yml
index f827cb9a6373..758deca93c82 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -393,6 +393,7 @@ jobs:
if: >-
fromJson(needs.precondition.outputs.required).pyspark == 'true' ||
fromJson(needs.precondition.outputs.required).lint == 'true' ||
+ fromJson(needs.precondition.outputs.required).docs == 'true' ||
fromJson(needs.precondition.outputs.required).sparkr == 'true'
runs-on: ubuntu-latest
permissions:
@@ -422,7 +423,8 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- - name: Build and push
+ - name: Build and push for branch-3.5
+ if: inputs.branch == 'branch-3.5'
id: docker_build
uses: docker/build-push-action@v6
with:
@@ -433,7 +435,7 @@ jobs:
# Use the infra image cache to speed up
cache-from:
type=registry,ref=ghcr.io/apache/spark/apache-spark-github-action-image-cache:${{
inputs.branch }}
- name: Build and push (Documentation)
- if: hashFiles('dev/spark-test-image/docs/Dockerfile') != ''
+ if: ${{ inputs.branch != 'branch-3.5' &&
hashFiles('dev/spark-test-image/docs/Dockerfile') != '' }}
id: docker_build_docs
uses: docker/build-push-action@v6
with:
@@ -444,7 +446,7 @@ jobs:
# Use the infra image cache to speed up
cache-from:
type=registry,ref=ghcr.io/apache/spark/apache-spark-github-action-image-docs-cache:${{
inputs.branch }}
- name: Build and push (Linter)
- if: hashFiles('dev/spark-test-image/lint/Dockerfile') != ''
+ if: ${{ inputs.branch != 'branch-3.5' &&
hashFiles('dev/spark-test-image/lint/Dockerfile') != '' }}
id: docker_build_lint
uses: docker/build-push-action@v6
with:
@@ -455,7 +457,7 @@ jobs:
# Use the infra image cache to speed up
cache-from:
type=registry,ref=ghcr.io/apache/spark/apache-spark-github-action-image-lint-cache:${{
inputs.branch }}
- name: Build and push (SparkR)
- if: hashFiles('dev/spark-test-image/sparkr/Dockerfile') != ''
+ if: ${{ inputs.branch != 'branch-3.5' &&
hashFiles('dev/spark-test-image/sparkr/Dockerfile') != '' }}
id: docker_build_sparkr
uses: docker/build-push-action@v6
with:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]