Skip to content

Commit

Permalink
CICD: Moved the Dockerhub organization name to a environment variabel.
Browse files Browse the repository at this point in the history
  • Loading branch information
cafferata committed Jan 26, 2024
1 parent 51e82e8 commit 0153c37
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ nfpms:
- deb
dockers:
- image_templates:
- &amd_image "stackexchange/{{.ProjectName}}:{{ .Version }}-amd64"
- &amd_image_ghcr "ghcr.io/stackexchange/{{.ProjectName}}:{{ .Version }}-amd64"
- &amd_image "{{ .Env.DOCKERHUB_ORGANIZATION }}/{{.ProjectName}}:{{ .Version }}-amd64"
- &amd_image_ghcr "ghcr.io/{{ .Env.DOCKERHUB_ORGANIZATION }}/{{.ProjectName}}:{{ .Version }}-amd64"
goos: linux
goarch: amd64
use: buildx
Expand All @@ -114,8 +114,8 @@ dockers:
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.source={{ .GitURL }}"
- image_templates:
- &arm_image "stackexchange/{{.ProjectName}}:{{ .Version }}-arm64"
- &arm_image_ghcr "ghcr.io/stackexchange/{{.ProjectName}}:{{ .Version }}-arm64"
- &arm_image "{{ .Env.DOCKERHUB_ORGANIZATION }}/{{.ProjectName}}:{{ .Version }}-arm64"
- &arm_image_ghcr "ghcr.io/{{ .Env.DOCKERHUB_ORGANIZATION }}/{{.ProjectName}}:{{ .Version }}-arm64"
goos: linux
goarch: arm64
use: buildx
Expand All @@ -130,20 +130,20 @@ dockers:
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.source={{ .GitURL }}"
docker_manifests:
- name_template: "stackexchange/{{.ProjectName}}:{{ .Version }}"
- name_template: "{{ .Env.DOCKERHUB_ORGANIZATION }}/{{.ProjectName}}:{{ .Version }}"
image_templates:
- *amd_image
- *arm_image
- name_template: "ghcr.io/stackexchange/{{.ProjectName}}:{{ .Version }}"
- name_template: "ghcr.io/{{ .Env.DOCKERHUB_ORGANIZATION }}/{{.ProjectName}}:{{ .Version }}"
image_templates:
- *amd_image_ghcr
- *arm_image_ghcr
- name_template: "stackexchange/{{.ProjectName}}:latest"
- name_template: "{{ .Env.DOCKERHUB_ORGANIZATION }}/{{.ProjectName}}:latest"
skip_push: auto
image_templates:
- *amd_image
- *arm_image
- name_template: "ghcr.io/stackexchange/{{.ProjectName}}:latest"
- name_template: "ghcr.io/{{ .Env.DOCKERHUB_ORGANIZATION }}/{{.ProjectName}}:latest"
skip_push: auto
image_templates:
- *amd_image_ghcr
Expand Down

0 comments on commit 0153c37

Please sign in to comment.