File tree Expand file tree Collapse file tree 3 files changed +4
-24
lines changed Expand file tree Collapse file tree 3 files changed +4
-24
lines changed Original file line number Diff line number Diff line change 17
17
jobs :
18
18
build :
19
19
runs-on : ubuntu-latest
20
- strategy :
21
- matrix :
22
- os : [ linux ]
23
- arch : [ amd64 ]
24
20
steps :
25
21
- name : Checkout
26
22
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -60,13 +56,10 @@ jobs:
60
56
provenance : false
61
57
build-args : |
62
58
APP_VERSION=dev-build.${{ steps.vars.outputs.short_sha }}
63
- TARGET_OS=${{ matrix.os }}
64
- TARGET_ARCH=${{ matrix.arch }}
65
59
push : false
66
60
load : true
67
61
tags : ${{ steps.meta.outputs.tags }}
68
62
labels : ${{ steps.meta.outputs.labels }}
69
- platforms : ${{ matrix.os }}/${{ matrix.arch }}
70
63
cache-from : type=gha
71
64
cache-to : type=gha,mode=max
72
65
90
83
provenance : false
91
84
build-args : |
92
85
APP_VERSION=dev-build.${{ steps.vars.outputs.short_sha }}
93
- TARGET_OS=${{ matrix.os }}
94
- TARGET_ARCH=${{ matrix.arch }}
95
86
push : ${{ github.event_name != 'pull_request' }}
96
87
tags : ${{ steps.meta.outputs.tags }}
97
88
labels : ${{ steps.meta.outputs.labels }}
98
- platforms : ${{ matrix.os }}/${{ matrix.arch }}
99
89
cache-from : type=gha
100
90
cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 15
15
jobs :
16
16
build :
17
17
runs-on : ubuntu-latest
18
- strategy :
19
- matrix :
20
- os :
21
- - linux
22
- arch :
23
- - amd64
24
- - arm64
25
18
steps :
26
19
- name : Checkout
27
20
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -57,11 +50,11 @@ jobs:
57
50
provenance : false
58
51
build-args : |
59
52
APP_VERSION=${{ github.ref_name }}
60
- TARGET_OS=${{ matrix.os }}
61
- TARGET_ARCH=${{ matrix.arch }}
62
53
push : ${{ startsWith(github.ref, 'refs/tags/') }}
63
54
tags : ${{ steps.meta.outputs.tags }}
64
55
labels : ${{ steps.meta.outputs.labels }}
65
- platforms : ${{ matrix.os }}/${{ matrix.arch }}
56
+ platforms : |
57
+ linux/amd64
58
+ linux/arm64
66
59
cache-from : type=gha
67
60
cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 2
2
FROM golang:1.24.5@sha256:14fd8a55e59a560704e5fc44970b301d00d344e45d6b914dda228e09f359a088 AS build-stage
3
3
4
4
ARG APP_VERSION=dev
5
- ARG TARGET_OS=linux
6
- ARG TARGET_ARCH=amd64
7
5
8
6
# Set destination for COPY
9
7
WORKDIR /app
@@ -22,8 +20,7 @@ COPY . ./
22
20
# Set build environment
23
21
ENV GOCACHE=/root/.cache/go-build \
24
22
CGO_ENABLED=0 \
25
- GOOS=${TARGET_OS} \
26
- GOARCH=${TARGET_ARCH}
23
+ GOOS=linux
27
24
28
25
# Build and strip binary
29
26
RUN --mount=type=cache,target=/go/pkg/mod/ \
You can’t perform that action at this time.
0 commit comments