Skip to content

Commit

Permalink
build(goreleaser): update docker image name template
Browse files Browse the repository at this point in the history
  • Loading branch information
fyvri committed Dec 18, 2024
1 parent c0c10b6 commit cc82ed8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ jobs:
args: release --clean --config ./deployments/goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}
DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
DOCKERHUB_REPOSITORY: ${{ vars.DOCKERHUB_REPOSITORY }}
20 changes: 10 additions & 10 deletions deployments/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 2
project_name: go-qris
project_name: "{{ .Env.DOCKERHUB_REPOSITORY }}"
env:
- GO111MODULE=on

Expand Down Expand Up @@ -34,30 +34,30 @@ archives:

dockers:
- image_templates:
- "docker.io/azisalvriyanto/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:{{ .Tag }}-amd64"
use: buildx
dockerfile: ./deployments/Dockerfile
build_flag_templates:
- "--platform=linux/amd64"

- image_templates:
- "docker.io/azisalvriyanto/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "docker.io/azisalvriyanto/{{ .ProjectName }}:latest"
- "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:latest"
use: buildx
dockerfile: ./deployments/Dockerfile
goarch: arm64
build_flag_templates:
- --platform=linux/arm64/v8

docker_manifests:
- name_template: "docker.io/azisalvriyanto/{{ .ProjectName }}:{{ .Tag }}"
- name_template: "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:{{ .Tag }}"
image_templates:
- "docker.io/azisalvriyanto/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "docker.io/azisalvriyanto/{{ .ProjectName }}:{{ .Tag }}-arm64"
- name_template: "docker.io/azisalvriyanto/{{ .ProjectName }}:latest"
- "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:{{ .Tag }}-arm64"
- name_template: "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:latest"
image_templates:
- "docker.io/azisalvriyanto/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "docker.io/azisalvriyanto/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "docker.io/{{ .Env.DOCKERHUB_USERNAME }}/{{ .ProjectName }}:{{ .Tag }}-arm64"

changelog:
sort: asc
Expand Down

0 comments on commit cc82ed8

Please sign in to comment.