ci: explicitly add CLI signature as release artifact (#1917)

This commit is contained in:
Malte Poll 2023-06-14 09:56:11 +02:00 committed by GitHub
parent 8910e9bac4
commit ee77e3922a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -16,6 +16,10 @@ on:
description: "Container registry to use"
type: string
default: ghcr.io
key:
description: "Key to use for signing. Set to 'release' to use release key, set to 'dev' to use the dev key."
type: string
required: true
workflow_call:
inputs:
ref:
@ -31,6 +35,10 @@ on:
description: "Container registry to use"
type: string
default: ghcr.io
key:
description: "Key to use for signing. Set to 'release' to use release key, set to 'dev' to use the dev key."
type: string
required: true
jobs:
build-cli:
@ -58,15 +66,17 @@ jobs:
targetOS: ${{ matrix.os }}
targetArch: ${{ matrix.arch }}
enterpriseCLI: true
cosignPublicKey: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.COSIGN_PUBLIC_KEY || secrets.COSIGN_DEV_PUBLIC_KEY }}
cosignPrivateKey: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.COSIGN_PRIVATE_KEY || secrets.COSIGN_DEV_PRIVATE_KEY }}
cosignPassword: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.COSIGN_PASSWORD || secrets.COSIGN_DEV_PASSWORD }}
cosignPublicKey: ${{ inputs.key == 'release' && secrets.COSIGN_PUBLIC_KEY || secrets.COSIGN_DEV_PUBLIC_KEY }}
cosignPrivateKey: ${{ inputs.key == 'release' && secrets.COSIGN_PRIVATE_KEY || secrets.COSIGN_DEV_PRIVATE_KEY }}
cosignPassword: ${{ inputs.key == 'release' && secrets.COSIGN_PASSWORD || secrets.COSIGN_DEV_PASSWORD }}
- name: Upload CLI as artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: constellation-${{ matrix.os }}-${{ matrix.arch }}
path: build/constellation-${{ matrix.os }}-${{ matrix.arch }}
path: |
build/constellation-${{ matrix.os }}-${{ matrix.arch }}
build/constellation-${{ matrix.os }}-${{ matrix.arch }}.sig
push-containers:
runs-on: ubuntu-22.04

View File

@ -266,6 +266,7 @@ jobs:
with:
ref: "refs/tags/${{ inputs.version }}"
pushContainers: true
key: 'release'
e2e-tests:
name: Run E2E tests