Merge branch 'main' of https://github.com/actions/starter-workflows into partner_templates
This commit is contained in:
@@ -42,6 +42,9 @@ jobs:
|
|||||||
- name: Install cosign
|
- name: Install cosign
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: sigstore/cosign-installer@1e95c1de343b5b0c23352d6417ee3e48d5bcd422
|
uses: sigstore/cosign-installer@1e95c1de343b5b0c23352d6417ee3e48d5bcd422
|
||||||
|
with:
|
||||||
|
cosign-release: 'v1.4.0'
|
||||||
|
|
||||||
|
|
||||||
# Workaround: https://github.com/docker/build-push-action/issues/461
|
# Workaround: https://github.com/docker/build-push-action/issues/461
|
||||||
- name: Setup Docker buildx
|
- name: Setup Docker buildx
|
||||||
@@ -76,18 +79,15 @@ jobs:
|
|||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
# Sign the resulting Docker image digest except on PRs and private repos
|
# Sign the resulting Docker image digest except on PRs.
|
||||||
# The keyless signing process records signatures on the Rekor public
|
# This will only write to the public Rekor transparency log when the Docker
|
||||||
# transparency log, so signing is disabled for private repos by default
|
# repository is public to avoid leaking data. If you would like to publish
|
||||||
# to avoid leaking private data. If you wish to sign things anyways,
|
# transparency data even for private images, pass --force to cosign below.
|
||||||
# then this check can be removed and --force can be added to the cosign
|
|
||||||
# command below.
|
|
||||||
# https://github.com/sigstore/cosign
|
# https://github.com/sigstore/cosign
|
||||||
- name: Sign the published Docker image
|
- name: Sign the published Docker image
|
||||||
if: ${{ github.event_name != 'pull_request' && !github.event.repository.private }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
env:
|
env:
|
||||||
COSIGN_EXPERIMENTAL: "true"
|
COSIGN_EXPERIMENTAL: "true"
|
||||||
# This step uses the identity token to provision an ephemeral certificate
|
# This step uses the identity token to provision an ephemeral certificate
|
||||||
# against the sigstore community Fulcio instance, and records it to the
|
# against the sigstore community Fulcio instance.
|
||||||
# sigstore community Rekor transparency log.
|
|
||||||
run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}
|
run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}
|
||||||
|
|||||||
Reference in New Issue
Block a user