Skip to content

Commit

Permalink
fix: update Cosign for image
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 committed Jul 16, 2024
1 parent 5f67f9e commit 81cca08
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/copybara-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Get Docker image digest
id: digest
run: |
echo "DOCKER_IMAGE_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' shreyasbhat0/copybara:$(echo ${{ steps.meta.outputs.tags }} | cut -d',' -f1))" >> $GITHUB_ENV
- name: Install Cosign
uses: sigstore/cosign-installer@main

- name: Sign the image with GitHub OIDC **EXPERIMENTAL**
run: cosign sign --oidc-issuer https://token.actions.githubusercontent.com ${TAGS}
run: cosign sign --oidc-issuer https://token.actions.githubusercontent.com ${{ env.DOCKER_IMAGE_DIGEST }}
env:
COSIGN_EXPERIMENTAL: 1
TAGS: ${{ steps.meta.outputs.tags }}
COSIGN_EXPERIMENTAL: 1

0 comments on commit 81cca08

Please sign in to comment.