Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dummy Backend
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Examples
Javascript
Dummy Backend
Commits
057a33c6
Unverified
Commit
057a33c6
authored
1 year ago
by
Dmitriy Safronov
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
sign images (#9)
Signed-off-by:
Dmitriy Safronov
<
zimniy@cyberbrain.pw
>
parent
9f1d5650
Branches
Branches containing commit
Tags
v0.0.7-rc1
Tags containing commit
No related merge requests found
Pipeline
#38642
passed
1 year ago
Stage: build
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/docker-publish.yml
+20
-20
20 additions, 20 deletions
.github/workflows/docker-publish.yml
with
20 additions
and
20 deletions
.github/workflows/docker-publish.yml
+
20
−
20
View file @
057a33c6
...
...
@@ -99,23 +99,23 @@ jobs:
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
#
#
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
.3.0
# 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
# with:
# cosign-release: 'v2.2.2'
#
#
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
#
#
transparency data even for private images, pass --force to cosign below.
#
#
https://github.com/sigstore/cosign
#
- name: Sign the published Docker image
#
if: ${{ github.event_name != 'pull_request' }}
#
env:
#
COSIGN_EXPERIMENTAL: "true"
#
# This step uses the identity token to provision an ephemeral certificate
#
# against the sigstore community Fulcio instance.
#
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ 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
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
-
name
:
Sign the published Docker image
if
:
${{ github.event_name != 'pull_request' }}
env
:
COSIGN_EXPERIMENTAL
:
"
true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run
:
echo "${{ steps.meta.outputs.tags }}" |
grep -E '^(.+):(.+)-(.+)-(.+)$|^(.+):([0-9]+).([0-9]+).([0-9]+)(.+)$' |
xargs -I {} cosign sign
--yes
{}@${{ steps.build-and-push.outputs.digest }}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment