Skip to content

Commit

Permalink
Maybe sign releases
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed May 9, 2024
1 parent 8c76aad commit 39f0d22
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
contents: read
packages: write
security-events: write # To upload Trivy sarif files
id-token: write # needed for signing the images with GitHub OIDC Token
steps:
- name: Install Cosign
uses: sigstore/[email protected]
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
Expand Down Expand Up @@ -62,6 +65,18 @@ jobs:
ghcr.io/${{ env.GHCR_NAMESPACE }}/sliding-sync:latest
ghcr.io/${{ env.GHCR_NAMESPACE }}/sliding-sync:${{ github.ref_name }}
- name: Sign the images with GitHub OIDC Token
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
env:
DIGEST: ${{ steps.docker_build_sliding_sync_release.outputs.digest }}
TAGS: ghcr.io/${{ env.GHCR_NAMESPACE }}/sliding-sync:${{ github.ref_name }}
run: |
images=""
for tag in ${TAGS}; do
images+="${tag}@${DIGEST} "
done
cosign sign --yes ${images}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
Expand Down

0 comments on commit 39f0d22

Please sign in to comment.