Skip to content

Commit 123078d

Browse files
committed
Re-add conditional prod image build
Prod image build sometimes (quite often) is not needed. When removing `pull_request_target` in #45266 `wait-for=prod-images` had the condition that prevented it from running (and the `build-prod-images` step depended on it) - but this condition is gone now. Instead of preventing the whole composite workflow from running, we are adding it to "build-prod-packages" so that the whole workflow can complete as prerequisite to "finalize-tests" which should be executed regardless from `prod-image-build` being executed.
1 parent cda0e9e commit 123078d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ jobs:
557557
constraints-branch: ${{ needs.build-info.outputs.default-constraints-branch }}
558558
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
559559
disable-airflow-repo-cache: ${{ needs.build-info.outputs.disable-airflow-repo-cache }}
560+
prod-image-build: ${{ needs.build-info.outputs.prod-image-build }}
560561

561562
additional-prod-image-tests:
562563
name: "Additional PROD image tests"

.github/workflows/prod-image-build.yml

+5
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,17 @@ on: # yamllint disable-line rule:truthy
112112
description: "Disable airflow repo cache read from main."
113113
required: true
114114
type: string
115+
prod-image-build:
116+
description: "Whether this is a prod-image build (true/false)"
117+
required: true
118+
type: string
115119
jobs:
116120

117121
build-prod-packages:
118122
name: "Build Airflow and provider packages"
119123
timeout-minutes: 10
120124
runs-on: ${{ fromJSON(inputs.runs-on-as-json-public) }}
125+
if: inputs.prod-image-build == 'true'
121126
env:
122127
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
123128
VERSION_SUFFIX_FOR_PYPI: ${{ inputs.branch == 'main' && 'dev0' || '' }}

0 commit comments

Comments
 (0)