Skip to content

Commit

Permalink
build(goreleaser): use vars in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fyvri committed Dec 18, 2024
1 parent 23a4c38 commit afbc2ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@ 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: ${DOCKERHUB_REPOSITORY}
project_name: ${{ vars.DOCKERHUB_REPOSITORY }}
env:
- GO111MODULE=on

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

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

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

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

changelog:
sort: asc
Expand Down

0 comments on commit afbc2ee

Please sign in to comment.