Skip to content

Commit

Permalink
feat: Support amd64 and arm64 docker archs (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnavarro authored Apr 10, 2024
1 parent b4c2591 commit 4b4a339
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,40 @@ signs:

dockers:
- image_templates:
- "ghcr.io/gnolang/tx-indexer:latest"
- "ghcr.io/gnolang/tx-indexer:{{ .Tag }}"
- "ghcr.io/gnolang/tx-indexer:{{ .Tag }}-amd64"
use: buildx
dockerfile: Dockerfile.release
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- image_templates:
- "ghcr.io/gnolang/tx-indexer:{{ .Tag }}-arm64"
use: buildx
dockerfile: Dockerfile.release
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"

docker_manifests:
- name_template: 'ghcr.io/gnolang/tx-indexer:{{ .Tag }}'
image_templates:
- 'ghcr.io/gnolang/tx-indexer:{{ .Tag }}-arm64'
- 'ghcr.io/gnolang/tx-indexer:{{ .Tag }}-amd64'
- name_template: 'ghcr.io/gnolang/tx-indexer:latest'
image_templates:
- 'ghcr.io/gnolang/tx-indexer:{{ .Tag }}-arm64'
- 'ghcr.io/gnolang/tx-indexer:{{ .Tag }}-amd64'

docker_signs:
- cmd: cosign
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- uses: goreleaser/goreleaser-action@v5
with:
version: latest
Expand Down

0 comments on commit 4b4a339

Please sign in to comment.