diff --git a/.github/workflows/docker-pub.yml b/.github/workflows/docker-pub.yml index d91553b..13bcab1 100644 --- a/.github/workflows/docker-pub.yml +++ b/.github/workflows/docker-pub.yml @@ -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 @@ -59,12 +59,12 @@ jobs: file: Dockerfile platforms: linux/amd64,linux/arm64 push: true - tags: ${{ steps.meta.outputs.dtag }} + tags: ${{ env.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 }} @@ -74,7 +74,7 @@ jobs: file: Dockerfile platforms: linux/amd64,linux/arm64 push: true - tags: ${{ steps.meta.outputs.rtag }} + tags: ${{ env.RELEASE_TAG }} - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 @@ -82,3 +82,11 @@ jobs: 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 \ No newline at end of file