Skip to content

Commit

Permalink
Build for x64 & arm (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilyOrg committed Jan 6, 2024
2 parents 9f4be1e + 6db07c9 commit c85cc0e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}


- name: Set up QEMU for Multiarch Builds
uses: docker/setup-qemu-action@v3

- name: Run GoReleaser (Push)
if: github.event_name == 'push'
uses: goreleaser/goreleaser-action@v4
Expand Down
40 changes: 36 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,43 @@ builds:
- embedgeo
dockers:
- dockerfile: Dockerfile-goreleaser
use: buildx
image_templates:
- "ghcr.io/smilyorg/photofield:{{ .Tag }}"
- "ghcr.io/smilyorg/photofield:v{{ .Major }}"
- "ghcr.io/smilyorg/photofield:v{{ .Major }}.{{ .Minor }}"
- "ghcr.io/smilyorg/photofield:latest"
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-amd64"
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"

- dockerfile: Dockerfile-goreleaser
use: buildx
image_templates:
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-arm64"
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
goarch: arm64

docker_manifests:
- name_template: "ghcr.io/smilyorg/photofield:{{ .Tag }}"
image_templates:
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-amd64"
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-arm64"

- name_template: "ghcr.io/smilyorg/photofield:v{{ .Major }}"
image_templates:
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-amd64"
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-arm64"

- name_template: "ghcr.io/smilyorg/photofield:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-amd64"
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-arm64"

- name_template: "ghcr.io/smilyorg/photofield:latest"
image_templates:
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-amd64"
- "ghcr.io/smilyorg/photofield:{{ .Tag }}-arm64"

archives:
- format: zip
name_template: >-
Expand Down

0 comments on commit c85cc0e

Please sign in to comment.