mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-04-20 00:11:23 +02:00
add cross-compile
This commit is contained in:
parent
453f03d832
commit
96db61831c
2 changed files with 8 additions and 8 deletions
5
.github/workflows/docker-on-push.yml
vendored
5
.github/workflows/docker-on-push.yml
vendored
|
@ -12,9 +12,6 @@ jobs:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
@ -29,7 +26,7 @@ jobs:
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository }}:master
|
ghcr.io/${{ github.repository }}:master
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
FROM golang:alpine AS builder
|
FROM --platform=$BUILDPLATFORM golang:1.23.4-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /steamsalty
|
WORKDIR /steamsalty
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache ca-certificates
|
RUN apk update && apk add --no-cache ca-certificates
|
||||||
|
|
||||||
COPY . .
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
RUN go build -o /app/steamsalty
|
|
||||||
|
COPY . .
|
||||||
|
ARG TARGETOS TARGETARCH
|
||||||
|
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /app/steamsalty
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue