Skip to content

Commit 7b6a705

Browse files
authored
Merge pull request #242 from smlx/dockers-v2
fix: update Dockerfile for goreleaser multiarch
2 parents 317f9f0 + b1d309f commit 7b6a705

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ jobs:
6565
tags: ${{ steps.docker_metadata.outputs.tags }}
6666
labels: ${{ steps.docker_metadata.outputs.labels }}
6767
file: Dockerfile
68-
build-args: BINARY=${{ matrix.binary }}
69-
context: dist/${{ matrix.binary }}_linux_amd64_v1
68+
build-args: |
69+
BINARY=${{ matrix.binary }}
70+
TARGETPLATFORM=${{ matrix.binary }}_linux_amd64_v1
71+
context: dist
7072
check-tag:
7173
permissions:
7274
contents: read

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ ARG BINARY=binary-build-arg-not-defined
33
ENV BINARY=${BINARY}
44
ENTRYPOINT ["sh", "-c"]
55
CMD ["exec /${BINARY}"]
6-
COPY ${BINARY} /
6+
# TARGETPLATFORM is defined by goreleaser during the build
7+
ARG TARGETPLATFORM
8+
COPY ${TARGETPLATFORM}/${BINARY} /

0 commit comments

Comments
 (0)