Skip to content

Commit 291401a

Browse files
committed
ci: fix id duplication
1 parent dc5e158 commit 291401a

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/docker-pub.yml

+14-6
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ jobs:
3838
username: ${{ github.repository_owner }}
3939
password: ${{ secrets.GH_TOKEN }}
4040

41-
- name: Build Meta
41+
- name: Build Nightly Meta
4242
run: |
43-
echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly-${{ steps.date.outputs.date }}"
43+
echo "DEVELOPMENT_TAG=ghcr.io/barelyhuman/goblin:nightly-${{ steps.date.outputs.date }}" >> $GITHUB_ENV
4444
4545
- name: Build Release Meta
4646
run: |
47-
echo "::set-output name=rtag::ghcr.io/barelyhuman/goblin:${{ github.ref_name }}"
47+
echo "RELEASE_TAG=ghcr.io/barelyhuman/goblin:${{ github.ref_name }}" >> $GITHUB_ENV
4848
if: github.ref_type == 'tag'
4949

5050
- name: Build and push nightly
@@ -59,12 +59,12 @@ jobs:
5959
file: Dockerfile
6060
platforms: linux/amd64,linux/arm64
6161
push: true
62-
tags: ${{ steps.meta.outputs.dtag }}
62+
tags: ${{ env.DEVELOPMENT_TAG }}
6363

6464
- name: Build and push nightly
6565
if: github.ref_type == 'tag'
6666
uses: docker/build-push-action@v5
67-
id: push
67+
id: pushRelease
6868
env:
6969
REGISTRY: ghcr.io
7070
OWNER: ${{ github.repository_owner }}
@@ -74,11 +74,19 @@ jobs:
7474
file: Dockerfile
7575
platforms: linux/amd64,linux/arm64
7676
push: true
77-
tags: ${{ steps.meta.outputs.rtag }}
77+
tags: ${{ env.RELEASE_TAG }}
7878

7979
- name: Generate artifact attestation
8080
uses: actions/attest-build-provenance@v1
8181
with:
8282
subject-name: ghcr.io/barelyhuman/goblin
8383
subject-digest: ${{ steps.push.outputs.digest }}
8484
push-to-registry: true
85+
86+
- name: Generate artifact attestation
87+
if: github.ref_type == 'tag'
88+
uses: actions/attest-build-provenance@v1
89+
with:
90+
subject-name: ghcr.io/barelyhuman/goblin
91+
subject-digest: ${{ steps.pushRelease.outputs.digest }}
92+
push-to-registry: true

0 commit comments

Comments
 (0)