-
Notifications
You must be signed in to change notification settings - Fork 1
Support multi-arch builds #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,23 @@ | ||||||||||
| FROM alpine:3.18 | ||||||||||
| FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder | ||||||||||
|
|
||||||||||
| ARG TARGETOS | ||||||||||
| ARG TARGETARCH | ||||||||||
|
Comment on lines
+3
to
+4
|
||||||||||
| ARG TARGETOS | |
| ARG TARGETARCH | |
| ARG TARGETOS=linux | |
| ARG TARGETARCH=amd64 |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,10 +1,29 @@ | ||||||||||
| FROM alpine:3.18 | ||||||||||
| FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder | ||||||||||
|
|
||||||||||
| ARG TARGETOS | ||||||||||
| ARG TARGETARCH | ||||||||||
|
Comment on lines
+3
to
+4
|
||||||||||
| ARG TARGETOS | |
| ARG TARGETARCH | |
| ARG TARGETOS=linux | |
| ARG TARGETARCH=amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LDFLAGS construction is duplicated across three separate steps (lines 47-51, 69-73, and 89-93). Consider extracting this logic into a reusable composite action or a separate script to reduce code duplication and ensure consistency.