Fix: duplicate build-args key in Build-Publish workflow#693
Conversation
The 'Build and push' step declared 'build-args:' twice, which is invalid YAML (duplicate mapping key) and fails the whole workflow with 'This run likely failed because of a workflow file issue'. As a result no cortex images publish, which in turn breaks the operator E2E that pulls ghcr.io/rossoctl/cortex/authbridge-*:latest. Merge the two build-arg sources (static matrix build_args used by authbridge-lite, and the dynamically resolved CPEX_FFI_* args used by authbridge-cpex) into a single multiline build-args value. Only one image sets each source, so concatenating them is safe. Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
📝 WalkthroughWalkthroughThe build workflow now merges matrix-provided and dynamically resolved CPEX build arguments into a single ChangesBuild workflow
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
esnible
left a comment
There was a problem hiding this comment.
Correctly fixes an invalid-YAML duplicate build-args: mapping key in the Build and push step that was rejecting the entire build.yaml workflow (so no cortex images published). The two build-arg sources are merged into one multiline block.
Verified against main that only authbridge-lite sets matrix.image_config.build_args (GO_BUILD_TAGS) and only authbridge-cpex produces steps.buildargs.outputs.args (CPEX_FFI_*, guarded by an image-name check), so concatenating the two sources is safe — no image sets both, and undeclared/blank build-args are ignored by docker/build-push-action.
Well-commented, minimal, all CI green (DCO, YAML Lint, Action Pinning, CodeQL). LGTM.
Assisted-By: Claude Code
Summary
The
Build and pushstep inbuild.yamldeclaredbuild-args:twice, which is invalid YAML (duplicate mapping key). GitHub rejects the whole workflow with "This run likely failed because of a workflow file issue", so no cortex images are being published underrossoctl/cortex.This merges the two build-arg sources into a single multiline
build-args::matrix.image_config.build_args(used byauthbridge-liteforGO_BUILD_TAGS)steps.buildargs.outputs.args(used byauthbridge-cpexforCPEX_FFI_VERSION/CPEX_FFI_ABI)Only one image sets each source, so concatenating them is safe.
Why it matters
Downstream,
rossoctl/operatorE2E fails inBeforeSuitepullingghcr.io/rossoctl/cortex/authbridge-*:latestwithdenied— because those images never publish while this workflow is invalid. Fixing this unblocks image publishing.(Note: after images publish, their GHCR package visibility should be confirmed public so anonymous CI pulls succeed — separate from this change.)
Part of the Kagenti to rossoctl rename CI cleanup.
Summary by CodeRabbit