diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 31d337c..07b7bff 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -38,6 +38,8 @@ jobs: - name: Install cosign uses: sigstore/cosign-installer@v3.4.0 + with: + cosign-release: 'v2.2.2' - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.2.0 @@ -69,20 +71,6 @@ jobs: push: true platforms: linux/amd64,linux/arm64 tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/xboard:latest,${{ env.REGISTRY }}/${{ github.repository_owner }}/xboard,${{ env.REGISTRY }}/${{ github.repository_owner }}/xboard:${{ steps.get_version.outputs.version }} - - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable - - name: Sign image with a key - run: | - images="" - for tag in ${TAGS}; do - images+="${tag}@${DIGEST} " - done - cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${images} - env: - TAGS: ${{ steps.meta.outputs.tags }} - COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} - COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} - DIGEST: ${{ steps.build-and-push.outputs.digest }} # Sign the resulting Docker image digest except on PRs. # This will only write to the public Rekor transparency log when the Docker # repository is public to avoid leaking data. If you would like to publish