Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign releases #433

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading