From 2c779f21616df35b9b8058913b754fecc8e5d52d Mon Sep 17 00:00:00 2001 From: iwilltry42 Date: Fri, 17 Jan 2025 11:11:45 +0100 Subject: [PATCH] fix(gha): update docker bake step to use unmerged bake-files --- .github/workflows/release.yaml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 85eae3676..c4caf5d32 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -154,31 +154,16 @@ jobs: type=ref,event=branch type=ref,event=pr type=sha - - name: Merge Metadata Bake Definitions - run: | - INPUT=(${{ steps.meta-k3d-binary.outputs.bake-file }} ${{ steps.meta-k3d-dind.outputs.bake-file }} ${{ steps.meta-k3d-proxy.outputs.bake-file }} ${{ steps.meta-k3d-tools.outputs.bake-file }}) - OUT_FILE=$GITHUB_WORKSPACE/bake-metadata.json - OUT_FILE_TMP=$GITHUB_WORKSPACE/bake-metadata-tmp.json - - cat << EOF > $OUT_FILE - { - "target": {} - } - EOF - - for file in "${INPUT[@]}"; do - cat $OUT_FILE > $OUT_FILE_TMP - jq -s '.[0] * .[1]' $OUT_FILE_TMP $file > $OUT_FILE - done - - rm "$OUT_FILE_TMP" # Build and Push container images - name: Build Images uses: docker/bake-action@v6 with: files: | ./docker-bake.hcl - $GITHUB_WORKSPACE/bake-metadata.json + cwd://${{ steps.meta-k3d-binary.outputs.bake-file }} + cwd://${{ steps.meta-k3d-dind.outputs.bake-file }} + cwd://${{ steps.meta-k3d-proxy.outputs.bake-file }} + cwd://${{ steps.meta-k3d-tools.outputs.bake-file }} targets: release push: false # Wait for tests to pass and push images (ONLY ON TAG)