fix arch issue
This commit is contained in:
parent
5631178a86
commit
f119125620
@ -13,7 +13,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build image
|
||||
run: docker build -t matrix-bot:latest .
|
||||
run: docker build -t matrix-bot:latest --build-arg TARGETOS=linux --build-arg TARGETARCH=arm64 .
|
||||
|
||||
- name: Stop and remove old container
|
||||
run: |
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
FROM golang:1.25.5-alpine AS build
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache ca-certificates olm-dev build-base
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
COPY go.mod ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o matrix-bot ./
|
||||
RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-arm64} go build -o matrix-bot ./
|
||||
|
||||
FROM alpine:3.19
|
||||
WORKDIR /app
|
||||
|
||||
Loading…
Reference in New Issue
Block a user