Skip to content

Commit

Permalink
Merge pull request #77 from smlx/consistent-var-naming
Browse files Browse the repository at this point in the history
chore: use consistent environment variable naming
  • Loading branch information
smlx authored Dec 21, 2023
2 parents 41d2df2 + 8b979ea commit c0099fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v5.4.0
with:
images: ghcr.io/${{ github.repository }}/${{ matrix.binary }}
- run: echo "REPO_NAME=$(basename ${{ github.repository }})" >> "$GITHUB_ENV"
- run: echo "GITHUB_REPOSITORY_NAME=$(basename ${{ github.repository }})" >> "$GITHUB_ENV"
- name: Build and push ${{ matrix.binary }} container image
if: github.actor != 'dependabot[bot]'
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
Expand All @@ -48,4 +48,4 @@ jobs:
tags: ${{ steps.docker_metadata.outputs.tags }}
labels: ${{ steps.docker_metadata.outputs.labels }}
file: deploy/${{ matrix.binary }}/Dockerfile
context: dist/${{ env.REPO_NAME }}_linux_amd64_v1
context: dist/${{ env.GITHUB_REPOSITORY_NAME }}_linux_amd64_v1
20 changes: 10 additions & 10 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,28 @@ signs:

dockers:
- image_templates:
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-amd64"
use: buildx
dockerfile: deploy/go-cli-github/Dockerfile
dockerfile: deploy/{{ .Binary }}/Dockerfile
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-arm64v8"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
dockerfile: deploy/go-cli-github/Dockerfile
dockerfile: deploy/{{ .Binary }}/Dockerfile
build_flag_templates:
- "--platform=linux/arm64/v8"

docker_manifests:
- name_template: "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}"
image_templates:
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-amd64"
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-arm64v8"
- name_template: "ghcr.io/smlx/go-cli-github/go-cli-github:latest"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-arm64v8"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:latest"
image_templates:
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-amd64"
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-arm64v8"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-arm64v8"

docker_signs:
- args:
Expand Down

0 comments on commit c0099fd

Please sign in to comment.