Skip to content

Commit

Permalink
fix: build on nethermind, buildx labels
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevMac committed Oct 2, 2024
1 parent 313cc0a commit d5528dd
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,19 @@ jobs:
- name: Build and push the Docker image using buildx
run: |
cmd=("docker" "buildx" "build" "--platform" "${{ matrix.platform }}" "--file" "nethermind/Dockerfile" "--tag" "${{ steps.meta.outputs.tags }}")
TARGETARCH="${{ matrix.platform##linux/ }}"
# Convert labels to individual --label flags with proper quoting
labels=""
while IFS= read -r line; do
cmd+=("--label" "$line")
labels="$labels --label \"$line\""
done <<< "${{ steps.meta.outputs.labels }}"
cmd+=("--build-arg" "BUILD_CONFIG=release")
cmd+=("--build-arg" "TARGETARCH=${{ matrix.platform }}")
cmd+=(".")
cmd+=("--push")
echo "${cmd[@]}"
"${cmd[@]}"
docker buildx build \
--platform "${{ matrix.platform }}" \
--file nethermind/Dockerfile \
--tag "${{ steps.meta.outputs.tags }}" \
$labels \
--build-arg BUILD_CONFIG=release \
--build-arg TARGETARCH="$TARGETARCH" \
. --push

0 comments on commit d5528dd

Please sign in to comment.