Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(release-container): cosign-base-image-only input #39

Merged
merged 1 commit into from
May 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/release-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ on:
required: false
default: 'https://github.com/radiorabe/.*'
type: string
cosign-base-image-only:
description: 'pass --base-image-only arg to cosign dockerfile verify'
required: false
default: false
type: boolean

jobs:
docker:
Expand Down Expand Up @@ -97,7 +102,7 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Verify Dockerfile using cosign
run: cosign dockerfile verify --certificate-oidc-issuer ${{ inputs.cosign-certificate-oidc-issuer }} --certificate-identity-regexp ${{ inputs.cosign-certificate-identity-regexp }} Dockerfile > /dev/null
run: cosign dockerfile verify --certificate-oidc-issuer ${{ inputs.cosign-certificate-oidc-issuer }} --certificate-identity-regexp ${{ inputs.cosign-certificate-identity-regexp }} ${{ inputs.cosign-base-image-only && '--base-image-only' }} Dockerfile > /dev/null
if: inputs.cosign-verify

- name: Build Container Image
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ jobs:
display-name: <display-name> # (3)
tags: <tags> # (4)
cosign-verify: true # (5)
cosign-certificate-oidc-issuer: <issues> # (6)
cosign-certificate-identity-regexp: <regexp> # (7)
cosign-certificate-oidc-issuer: [issues] # (6)
cosign-certificate-identity-regexp: [regexp] # (7)
cosign-base-image-only: [true] # (8)
```

1. Replace this with the actual name of the image, usually something like the
Expand All @@ -110,6 +111,8 @@ jobs:
6. Defaults to GitHub as an issuer and only needs tuning in special cases.
7. The default `https://github.com/radiorabe/.*` allows signatures from all
of our orga, add a more specific regexp if you feel the need.
8. Pass `--base-image-only` to cosign if you are copying binaries from a
source image that isn't signed with cosign.

#### Container Images: Schedule

Expand Down