Skip to content

Commit c0099fd

Browse files
authored
Merge pull request #77 from smlx/consistent-var-naming
chore: use consistent environment variable naming
2 parents 41d2df2 + 8b979ea commit c0099fd

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v5.4.0
4040
with:
4141
images: ghcr.io/${{ github.repository }}/${{ matrix.binary }}
42-
- run: echo "REPO_NAME=$(basename ${{ github.repository }})" >> "$GITHUB_ENV"
42+
- run: echo "GITHUB_REPOSITORY_NAME=$(basename ${{ github.repository }})" >> "$GITHUB_ENV"
4343
- name: Build and push ${{ matrix.binary }} container image
4444
if: github.actor != 'dependabot[bot]'
4545
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
@@ -48,4 +48,4 @@ jobs:
4848
tags: ${{ steps.docker_metadata.outputs.tags }}
4949
labels: ${{ steps.docker_metadata.outputs.labels }}
5050
file: deploy/${{ matrix.binary }}/Dockerfile
51-
context: dist/${{ env.REPO_NAME }}_linux_amd64_v1
51+
context: dist/${{ env.GITHUB_REPOSITORY_NAME }}_linux_amd64_v1

.goreleaser.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,28 @@ signs:
3838

3939
dockers:
4040
- image_templates:
41-
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-amd64"
41+
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-amd64"
4242
use: buildx
43-
dockerfile: deploy/go-cli-github/Dockerfile
43+
dockerfile: deploy/{{ .Binary }}/Dockerfile
4444
build_flag_templates:
4545
- "--platform=linux/amd64"
4646
- image_templates:
47-
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-arm64v8"
47+
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-arm64v8"
4848
use: buildx
4949
goarch: arm64
50-
dockerfile: deploy/go-cli-github/Dockerfile
50+
dockerfile: deploy/{{ .Binary }}/Dockerfile
5151
build_flag_templates:
5252
- "--platform=linux/arm64/v8"
5353

5454
docker_manifests:
55-
- name_template: "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}"
55+
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}"
5656
image_templates:
57-
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-amd64"
58-
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-arm64v8"
59-
- name_template: "ghcr.io/smlx/go-cli-github/go-cli-github:latest"
57+
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-amd64"
58+
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-arm64v8"
59+
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:latest"
6060
image_templates:
61-
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-amd64"
62-
- "ghcr.io/smlx/go-cli-github/go-cli-github:{{ .Version }}-arm64v8"
61+
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-amd64"
62+
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/{{ .Binary }}:{{ .Version }}-arm64v8"
6363

6464
docker_signs:
6565
- args:

0 commit comments

Comments
 (0)