Skip to content

Commit cdb6312

Browse files
dorien-erclaude
andcommitted
fix: use target_tag input for container build when called as subworkflow
Phase 2 built the docker image with tag 'main_build' whenever the top-level event was a push, but the push step tags it with the version input ('integration_build'), so the build/push tags diverged and the push failed. github.event_name reflects the top-level event, which is 'push' when integration-test triggers main-build from a branch push. Guard the 'main_build' tag with !is_workflow_call so a called build uses the provided target_tag, keeping direct pushes to main unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 91dcceb commit cdb6312

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/main-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ jobs:
249249
with:
250250
config_mod: |
251251
.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
252-
.engines[.type == 'docker'].target_tag := '${{ github.event_name == 'push' && 'main_build' || inputs.target_tag }}'
252+
.engines[.type == 'docker'].target_tag := '${{ (github.event_name == 'push' && !inputs.is_workflow_call) && 'main_build' || inputs.target_tag }}'
253253
engine: docker
254254
src: ${{ matrix.component.dir }}
255255
setup: build

0 commit comments

Comments
 (0)