Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Merge pull request #56 from zazuko/cosign
Browse files Browse the repository at this point in the history
Configure cosign
  • Loading branch information
ludovicm67 authored Oct 10, 2024
2 parents 279af9c + b061cca commit 3ba7415
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
permissions:
contents: read
packages: write
id-token: write

env:
DOCKER_IMAGE: ghcr.io/zazuko/stardog
Expand All @@ -20,6 +21,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Cosign
uses: sigstore/cosign-installer@v3.7.0

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand Down Expand Up @@ -56,3 +60,16 @@ jobs:
labels: ${{ steps.docker_meta.outputs.labels }}
platforms: |
linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Sign the images with GitHub OIDC Token
env:
DIGEST: ${{ steps.docker_build.outputs.digest }}
TAGS: ${{ steps.docker_meta.outputs.tags }}
run: |
images=""
for tag in ${TAGS}; do
images+="${tag}@${DIGEST} "
done
cosign sign --yes ${images}
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:

runs-on: ubuntu-latest

permissions:
contents: write

steps:
# This allow GitHub Actions to trigger the jobs for tags if needed
- name: Generate token
Expand Down

0 comments on commit 3ba7415

Please sign in to comment.