Skip to content

Commit

Permalink
added cosign to the container build
Browse files Browse the repository at this point in the history
  • Loading branch information
pjlammertyn committed Oct 15, 2024
1 parent e2ef3ae commit a777513
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/publish_to_pypi_and_build_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ jobs:
with:
submodules: 'true'

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

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -158,6 +161,13 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Sign image with a key
run: |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ env.REGISTRY }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
env:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}


# publish-to-testpypi:
# name: Publish Python 🐍 distribution 📦 to TestPyPI
Expand Down

0 comments on commit a777513

Please sign in to comment.