From cff6df5bd6a346ff8ab09e13dce7e5e10d56aee2 Mon Sep 17 00:00:00 2001 From: Mariusz Sabath Date: Tue, 21 Jul 2026 12:09:13 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20duplicate=20build-args=20k?= =?UTF-8?q?ey=20in=20Build-Publish=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/build.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a03f552d..3df7a82a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -146,9 +146,15 @@ jobs: with: context: ${{ matrix.image_config.context }} file: ${{ matrix.image_config.context }}/${{ matrix.image_config.dockerfile }} - build-args: ${{ matrix.image_config.build_args }} + # Merge both build-arg sources into a single key: static per-image + # args from the matrix (e.g. authbridge-lite GO_BUILD_TAGS) plus the + # dynamically resolved args (authbridge-cpex CPEX_FFI_*). A duplicate + # `build-args:` key is invalid YAML and fails the whole workflow; only + # one image sets each source, so concatenating them is safe. + build-args: | + ${{ matrix.image_config.build_args }} + ${{ steps.buildargs.outputs.args }} push: true platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-args: ${{ steps.buildargs.outputs.args }}