Skip to content

Commit 949d6f0

Browse files
committed
chore: rollback multiarch builds
1 parent d7a340b commit 949d6f0

2 files changed

Lines changed: 8 additions & 17 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,17 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17-
- name: Set up Docker Buildx
18-
uses: docker/setup-buildx-action@v3
19-
2017
- name: Log in to GitHub Container Registry
2118
uses: docker/login-action@v3
2219
with:
2320
registry: ghcr.io
2421
username: ${{ github.actor }}
2522
password: ${{ secrets.GHCR_TOKEN }}
2623

27-
- name: Build and push multiarch image
28-
env:
29-
SHORT_SHA: ${{ github.sha }}
24+
- name: Build and push image
3025
run: |
31-
SHORT_SHA=${SHORT_SHA::7}
32-
docker buildx build \
33-
--platform linux/amd64,linux/arm64/v8 --push \
34-
-t ghcr.io/voidcontests/api:$SHORT_SHA \
35-
-t ghcr.io/voidcontests/api:latest .
26+
SHORT_SHA=${GITHUB_SHA::7}
27+
docker build -t ghcr.io/voidcontests/api:$SHORT_SHA \
28+
-t ghcr.io/voidcontests/api:latest .
29+
docker push ghcr.io/voidcontests/api:$SHORT_SHA
30+
docker push ghcr.io/voidcontests/api:latest

Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM golang:1.25.1-alpine3.22 AS builder
2-
3-
ARG TARGETOS
4-
ARG TARGETARCH
1+
FROM golang:1.25.1-alpine3.22 AS builder
52

63
WORKDIR /app
74

@@ -11,8 +8,7 @@ COPY go.mod go.sum ./
118
RUN go mod download
129

1310
COPY . .
14-
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
15-
go build -a -ldflags "-w -s \
11+
RUN go build -a -ldflags "-w -s \
1612
-X github.com/voidcontests/api/internal/version.GIT_COMMIT=$(git rev-parse --short HEAD) \
1713
-X github.com/voidcontests/api/internal/version.GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" \
1814
-o build/api ./cmd/api

0 commit comments

Comments
 (0)