build: arm v7 (#26)

This commit is contained in:
l3uddz
2021-02-25 22:31:28 +00:00
committed by GitHub
parent bf23d93209
commit 9c2b2ece33
3 changed files with 8 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ jobs:
with: with:
context: . context: .
file: ./docker/Dockerfile file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64,linux/arm/v7
pull: true pull: true
push: true push: true
tags: | tags: |
@@ -147,7 +147,7 @@ jobs:
with: with:
context: . context: .
file: ./docker/Dockerfile file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64,linux/arm/v7
pull: true pull: true
push: true push: true
tags: | tags: |

View File

@@ -14,6 +14,9 @@ builds:
goarch: goarch:
- amd64 - amd64
- arm64 - arm64
- arm
goarm:
- 7
ldflags: ldflags:
- -s -w - -s -w
- -X "main.Version={{ .Version }}" - -X "main.Version={{ .Version }}"
@@ -25,7 +28,7 @@ builds:
# Archive # Archive
archives: archives:
- -
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}" name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
format: "binary" format: "binary"
# Checksum # Checksum

View File

@@ -2,6 +2,7 @@ FROM sc4h/alpine-s6overlay:3.12
ARG TARGETOS ARG TARGETOS
ARG TARGETARCH ARG TARGETARCH
ARG TARGETVARIANT
ENV \ ENV \
PATH="/app/nabarr:${PATH}" \ PATH="/app/nabarr:${PATH}" \
@@ -11,7 +12,7 @@ ENV \
APP_VERBOSITY="0" APP_VERBOSITY="0"
# Binary # Binary
COPY ["dist/nabarr_${TARGETOS}_${TARGETARCH}/nabarr", "/app/nabarr/nabarr"] COPY ["dist/nabarr_${TARGETOS}_${TARGETARCH}${TARGETVARIANT:+_7}/nabarr", "/app/nabarr/nabarr"]
# Add root files # Add root files
COPY ["docker/run", "/etc/services.d/nabarr/run"] COPY ["docker/run", "/etc/services.d/nabarr/run"]