Skip to content

Commit

Permalink
Add arm64 docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDallas committed May 24, 2022
1 parent a42388a commit 4964ff9
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 29 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
if: startsWith(github.ref, 'refs/tags/')
id: buildx
uses: docker/setup-buildx-action@v2

- uses: docker/login-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -52,7 +62,6 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: Upload assets
uses: actions/upload-artifact@v2
Expand Down
77 changes: 49 additions & 28 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ builds:
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ignore:
- goos: windows
goarch: arm64
- goos: windows
goarch: arm

archives:
- format_overrides:
Expand All @@ -31,51 +36,32 @@ archives:
- src: build/static/*
dst: static
strip_parent: true

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

nfpms:
# note that this is an array of nfpm configs
-
# Name of the package.
# Defaults to `ProjectName`.
package_name: premiumizearr

bindir: /opt/premiumizearrd

# Your app's vendor.
# Default is empty.
vendor: Jack Dallas.

# Template to your app's homepage.
# Default is empty.
homepage: https://github.com/JackDallas/Premiumizearr

# Your app's maintainer (probably you).
# Default is empty.
maintainer: Dallas <jack-dallas@outlook.com>

# Template to your app's description.
# Default is empty.
description: Service to connect premiumize.me to Arr clients.

# Your app's license.
# Default is empty.
license: GPLv3

# Formats to be generated.
formats:
- deb

contents:
# Basic file that applies to all packagers
- src: build/static/*
dst: /opt/premiumizearrd/static/
- src: init/premiumizearrd.service
Expand All @@ -85,25 +71,60 @@ nfpms:

dockers:
-
use: docker
goos: linux
goarch: amd64

image_templates:
- "ghcr.io/jackdallas/premiumizearr:{{ .Tag }}"
- "ghcr.io/jackdallas/premiumizearr:v{{ .Major }}"
- "ghcr.io/jackdallas/premiumizearr:v{{ .Major }}.{{ .Minor }}"
- "ghcr.io/jackdallas/premiumizearr:latest"

skip_push: auto
use: docker

build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/amd64"

extra_files:
- build/static/
-
use: buildx
goos: linux
goarch: arm64
image_templates:
- "ghcr.io/jackdallas/premiumizearr:{{ .Tag }}-arm64"
- "ghcr.io/jackdallas/premiumizearr:v{{ .Major }}-arm64"
- "ghcr.io/jackdallas/premiumizearr:v{{ .Major }}.{{ .Minor }}-arm64"
- "ghcr.io/jackdallas/premiumizearr:latest-arm64"
skip_push: auto
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/arm64"
extra_files:
- build/static/
-
use: buildx
goos: linux
goarch: arm
goarm: 7
image_templates:
- "ghcr.io/jackdallas/premiumizearr:{{ .Tag }}-armv7"
- "ghcr.io/jackdallas/premiumizearr:v{{ .Major }}-armv7"
- "ghcr.io/jackdallas/premiumizearr:v{{ .Major }}.{{ .Minor }}-armv7"
- "ghcr.io/jackdallas/premiumizearr:latest-armv7"
skip_push: auto
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/arm/v7"
extra_files:
- build/static/

0 comments on commit 4964ff9

Please sign in to comment.