[test] setup binfmt in qemu action

This commit is contained in:
sentriz
2021-02-09 01:12:08 +00:00
parent f73e1a0c99
commit d31ec7f666
2 changed files with 9 additions and 8 deletions

View File

@@ -15,6 +15,9 @@ jobs:
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

View File

@@ -1,23 +1,21 @@
FROM --platform=${BUILDPLATFORM} golang:1.15-alpine AS builder
FROM alpine:3.13.1 AS builder
RUN apk add -U --no-cache \
build-base \
ca-certificates \
git \
sqlite \
taglib-dev \
alsa-lib-dev
alsa-lib-dev \
go
WORKDIR /src
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN ./_do_gen_assets
RUN ./_do_build_server
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} ./_do_gen_assets
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} ./_do_build_server
FROM --platform=${BUILDPLATFORM} alpine:3.12.3
FROM alpine:3.13.1
RUN apk add -U --no-cache \
ffmpeg \
ca-certificates \