Skip to content

Commit d981b1b

Browse files
authored
fix: goreleaser (#15)
* chore: skip gh release upload * chore: add arch data to the image
1 parent e29503c commit d981b1b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.goreleaser.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@ dockers:
2020
goarch: amd64
2121
build_flag_templates:
2222
- "--platform=linux/amd64"
23+
- "--build-arg=BUILD_ARCH=amd64"
2324
dockerfile: "docker/Dockerfile"
25+
use: "buildx"
2426
- image_templates:
2527
- "oryd/{{ .ProjectName }}:{{ .Tag }}-arm64"
2628
- "oryd/{{ .ProjectName }}:{{ .ShortCommit }}-arm64"
2729
goarch: arm64
2830
build_flag_templates:
2931
- "--platform=linux/arm64"
32+
- "--build-arg=BUILD_ARCH=arm64"
3033
dockerfile: "docker/Dockerfile"
34+
use: "buildx"
3135

3236
docker_manifests:
3337
- name_template: "oryd/{{ .ProjectName }}:{{ .Tag }}"

docker/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
FROM alpine:3.20
22

33
ARG USER=ory
4+
ARG BUILD_ARCH=amd64
45
ENV HOME=/home/$USER
56
ENV JQ_VERSION=1.7.1
67
ENV KUBECTL_VERSION=1.31.2
78

89
RUN apk add --no-cache --update-cache --upgrade --latest \
910
ca-certificates curl netcat-openbsd coreutils bash inotify-tools procps
1011

11-
RUN curl -Lo /usr/local/bin/jq "https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64" &&\
12+
RUN curl -Lo /usr/local/bin/jq "https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux-${BUILD_ARCH}" &&\
1213
chmod +x /usr/local/bin/jq &&\
1314
jq --version
1415

1516
RUN addgroup -S $USER &&\
1617
adduser -S $USER -G $USER -D -H -s /bin/bash
1718

18-
RUN curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" &&\
19+
RUN curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${BUILD_ARCH}/kubectl" &&\
1920
chmod +x kubectl &&\
2021
mv kubectl /usr/local/bin/kubectl
2122

0 commit comments

Comments
 (0)