Skip to content

Commit

Permalink
ci: fix static tagged builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Dec 24, 2023
1 parent 67fdefc commit 229cb9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ jobs:
load: ${{ !fromJson(needs.prepare.outputs.push) }}
targets: static-builder
set: |
*.tags=
*.platform=${{ matrix.platform }}
*.cache-from=type=gha,scope=${{ needs.prepare.outputs.ref || github.ref }}-static-builder
*.cache-from=type=gha,scope=refs/heads/main-static-builder
Expand Down Expand Up @@ -140,8 +141,8 @@ jobs:
name: Copy binary
if: ${{ !fromJson(needs.prepare.outputs.push) }}
run: |
tag=$(jq -cr '.target."static-builder".tags | first' <<< "${METADATA}")
container=$(docker create --platform=${{ matrix.platform }} --name static-builder "${tag}")
image=$(jq -r '."static-builder"."containerimage.config.digest"' <<< "${METADATA}")
container=$(docker create --platform=${{ matrix.platform }} --name static-builder "${image}")
docker cp "${container}:/go/src/app/dist/${BINARY}" "${BINARY}"
env:
METADATA: ${{ needs.prepare.outputs.metadata }}
Expand Down

0 comments on commit 229cb9e

Please sign in to comment.