Skip to content

Commit

Permalink
add subject name with docker.io
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanngocptn committed May 10, 2024
1 parent 6e983e8 commit 6f4a363
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,33 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: tuanngocptn
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
id: push-ghcr
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ghcr.io/tuanngocptn/sentry-telegram-webhook
subject-digest: ${{ steps.push-ghcr.outputs.digest }}
subject-name: docker.io/tuanngocptn/sentry-telegram-webhook
subject-digest: ${{ steps.push-docker-hub.outputs.digest }}
push-to-registry: true

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: tuanngocptn
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build and push Docker image
# id: push-ghcr
# uses: docker/build-push-action@v5
# with:
# context: .
# file: ./Dockerfile
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}

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

0 comments on commit 6f4a363

Please sign in to comment.