Skip to content

Commit

Permalink
ci: fix id duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Sep 28, 2024
1 parent dc5e158 commit 07813a1
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/docker-pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}

- name: Build Meta
- name: Build Nightly Meta
run: |
echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly-${{ steps.date.outputs.date }}"
echo "DEVELOPMENT_TAG=ghcr.io/barelyhuman/goblin:nightly-${{ steps.date.outputs.date }}" >> $GITHUB_ENV
- name: Build Release Meta
run: |
echo "::set-output name=rtag::ghcr.io/barelyhuman/goblin:${{ github.ref_name }}"
echo "RELEASE_TAG=ghcr.io/barelyhuman/goblin:${{ github.ref_name }}" >> $GITHUB_ENV
if: github.ref_type == 'tag'

- name: Build and push nightly
Expand All @@ -59,12 +59,12 @@ jobs:
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.dtag }}
tags: $DEVELOPMENT_TAG

- name: Build and push nightly
if: github.ref_type == 'tag'
uses: docker/build-push-action@v5
id: push
id: pushRelease
env:
REGISTRY: ghcr.io
OWNER: ${{ github.repository_owner }}
Expand All @@ -74,11 +74,19 @@ jobs:
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.rtag }}
tags: $RELEASE_TAG

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ghcr.io/barelyhuman/goblin
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

- name: Generate artifact attestation
if: github.ref_type == 'tag'
uses: actions/attest-build-provenance@v1
with:
subject-name: ghcr.io/barelyhuman/goblin
subject-digest: ${{ steps.pushRelease.outputs.digest }}
push-to-registry: true

0 comments on commit 07813a1

Please sign in to comment.