Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
changed tags and attestation subject name
Browse files Browse the repository at this point in the history
  • Loading branch information
akyriako committed Oct 25, 2024
1 parent 0fed625 commit b7a8b78
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id-token: write

steps:
- name: Check out the repo
- name: Checkout
uses: actions/checkout@v4

- name: Log in to Container Registry
Expand All @@ -31,19 +31,25 @@ jobs:
with:
images: ${{ vars.DOCKER_NS }}/${{ vars.DOCKER_REPO }}

- name: Build and push Docker image
- name: Get Commit Hash
id: commit_hash
uses: prompt/actions-commit-hash@v3

- name: Build and Push Docker Image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ vars.DOCKER_REPO }}:${{ steps.commit_hash.outputs.short }}
${{ secrets.DOCKER_USERNAME }}/${{ vars.DOCKER_REPO }}:latest
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
- name: Generate Artifact Attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-name: ${{ secrets.DOCKER_USERNAME }}/${{ vars.DOCKER_REPO }}:${{ steps.commit_hash.outputs.short }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit b7a8b78

Please sign in to comment.