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

Start keyless signing kaniko releases #1841

Merged
merged 1 commit into from
Dec 18, 2021
Merged
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
53 changes: 44 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:

jobs:
build-executor:
permissions:
# Read the repo contents
contents: read
# Produce identity token for keyless signing
id-token: write

env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
Expand Down Expand Up @@ -71,11 +77,20 @@ jobs:
cosign-release: 'v1.4.1'

# Use cosign to sign the images
- run: |
- env:
COSIGN_EXPERIMENTAL: "true"
run: |
export KMS_VAL=gcpkms://projects/kaniko-project/locations/global/keyRings/cosign/cryptoKeys/cosign
cosign sign -kms $KMS_VAL gcr.io/kaniko-project/executor@${{ steps.build-and-push.outputs.digest }}
cosign sign gcr.io/kaniko-project/executor@${{ steps.build-and-push.outputs.digest }}

build-debug:
permissions:
# Read the repo contents
contents: read
# Produce identity token for keyless signing
id-token: write

env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
Comment on lines 95 to 96
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expand Down Expand Up @@ -116,7 +131,7 @@ jobs:
project_id: kaniko-project
export_default_credentials: true

# Configure docker to use the gcloud command-line tool as a credential helper
# Configure docker to use the gcloud command-line tool as a credential helper
- run: |
# Set up docker to authenticate
# via gcloud command-line tool.
Expand All @@ -126,7 +141,7 @@ jobs:
id: build-and-push
with:
context: .
file: ./deploy/Dockerfile_debug
file: ./deploy/Dockerfile_debug
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
Expand All @@ -139,12 +154,21 @@ jobs:
with:
cosign-release: 'v1.4.1'

# Use cosign to sign the images
- run: |
# Use cosign to sign the images
- env:
COSIGN_EXPERIMENTAL: "true"
run: |
export KMS_VAL=gcpkms://projects/kaniko-project/locations/global/keyRings/cosign/cryptoKeys/cosign
cosign sign -kms $KMS_VAL gcr.io/kaniko-project/executor@${{ steps.build-and-push.outputs.digest }}
cosign sign gcr.io/kaniko-project/executor@${{ steps.build-and-push.outputs.digest }}

build-warmer:
permissions:
# Read the repo contents
contents: read
# Produce identity token for keyless signing
id-token: write

env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
Expand Down Expand Up @@ -208,12 +232,21 @@ jobs:
with:
cosign-release: 'v1.4.1'

# Use cosign to sign the images
- run: |
# Use cosign to sign the images
- env:
COSIGN_EXPERIMENTAL: "true"
run: |
export KMS_VAL=gcpkms://projects/kaniko-project/locations/global/keyRings/cosign/cryptoKeys/cosign
cosign sign -kms $KMS_VAL gcr.io/kaniko-project/warmer@${{ steps.build-and-push.outputs.digest }}
cosign sign gcr.io/kaniko-project/warmer@${{ steps.build-and-push.outputs.digest }}

build-slim:
permissions:
# Read the repo contents
contents: read
# Produce identity token for keyless signing
id-token: write

env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
Expand Down Expand Up @@ -278,7 +311,9 @@ jobs:
cosign-release: 'v1.4.1'

# Use cosign to sign the images
- run: |
- env:
COSIGN_EXPERIMENTAL: "true"
run: |
export KMS_VAL=gcpkms://projects/kaniko-project/locations/global/keyRings/cosign/cryptoKeys/cosign
cosign sign -kms $KMS_VAL gcr.io/kaniko-project/executor@${{ steps.build-and-push.outputs.digest }}

cosign sign gcr.io/kaniko-project/executor@${{ steps.build-and-push.outputs.digest }}