-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,13 +28,13 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
# Install the cosign tool except on PR | ||
# https://github.com/sigstore/cosign-installer | ||
- name: Install cosign | ||
if: github.event_name != 'pull_request' | ||
uses: sigstore/cosign-installer@v3.2.0 | ||
uses: sigstore/cosign-installer@v3.4.0 | ||
with: | ||
cosign-release: "v2.2.1" | ||
|
||
|
@@ -58,7 +58,7 @@ jobs: | |
# https://github.com/docker/metadata-action | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/[email protected].0 | ||
uses: docker/[email protected].1 | ||
with: | ||
images: ${{ inputs.REGISTRY }}/${{ inputs.IMAGE_NAME }} | ||
tags: | | ||
|
@@ -68,7 +68,7 @@ jobs: | |
# https://github.com/docker/build-push-action | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v5.0.0 | ||
uses: docker/build-push-action@v5.1.0 | ||
with: | ||
context: ${{ inputs.IMAGE_CONTEXT }} | ||
file: ${{ inputs.IMAGE_FILE }} | ||
|
@@ -78,14 +78,14 @@ jobs: | |
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
# # Sign the resulting Docker image digest except on PRs. | ||
# # https://github.com/sigstore/cosign | ||
# - name: Sign the published Docker image | ||
# if: ${{ github.event_name != 'pull_request' }} | ||
# env: | ||
# # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable | ||
# TAGS: ${{ steps.meta.outputs.tags }} | ||
# DIGEST: ${{ steps.build-and-push.outputs.digest }} | ||
# # This step uses the identity token to provision an ephemeral certificate | ||
# # against the sigstore community Fulcio instance. | ||
# run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} | ||
# Sign the resulting Docker image digest except on PRs. | ||
# https://github.com/sigstore/cosign | ||
- name: Sign the published Docker image | ||
if: ${{ github.event_name != 'pull_request' }} | ||
env: | ||
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable | ||
TAGS: ${{ steps.meta.outputs.tags }} | ||
DIGEST: ${{ steps.build-and-push.outputs.digest }} | ||
# This step uses the identity token to provision an ephemeral certificate | ||
# against the sigstore community Fulcio instance. | ||
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |