Skip to content

Commit

Permalink
Update maven-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
saurav631 authored Aug 14, 2024
1 parent 693ee60 commit 1532b99
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,19 @@ jobs:

- name: sign container image
run: |
cosign sign --key env://COSIGN_KEY ghcr.io/saurav631/spring-petclinic:latest #--upload=true
cosign sign --key env://COSIGN_KEY ghcr.io/saurav631/spring-petclinic:latest --upload=true
shell: bash
env:
COSIGN_KEY: ${{secrets.Cosign_Key}}
COSIGN_PASSWORD: ${{secrets.Cosign_Key_Password}}

- name: Create Public Key File_
run: echo "${{ secrets.Cosign_Pub }}" > cosign.pub
# - name: Create Public Key File_
# run: echo "${{ secrets.Cosign_Pub }}" > cosign.pub

- name: Public Key Creation
run: |
cosign public-key --key cosign.key > cosign.pub
- name: Verify Docker Image Signature
run: |
cosign verify --key cosign.pub ghcr.io/saurav631/spring-petclinic:latest
cosign verify --key ./cosign.pub ghcr.io/saurav631/spring-petclinic:latest --check-claims=false

0 comments on commit 1532b99

Please sign in to comment.