Skip to content

Commit

Permalink
feat: sign pulumi binaries with cosign
Browse files Browse the repository at this point in the history
  • Loading branch information
dirien committed Nov 9, 2022
1 parent fdb5ea2 commit 5ff92a4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-build-binaries.yml
Expand Up @@ -48,6 +48,9 @@ jobs:
env:
PULUMI_VERSION: ${{ inputs.version }}

permissions:
id-token: write

steps:
- name: "Windows cache workaround"
# https://github.com/actions/cache/issues/752#issuecomment-1222415717
Expand Down Expand Up @@ -80,6 +83,7 @@ jobs:
- name: Setup versioning env vars
run: |
./scripts/versions.sh | tee -a "${GITHUB_ENV}"
- uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v2.8.1
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
Expand Down Expand Up @@ -116,4 +120,5 @@ jobs:
retention-days: 1
path: |
goreleaser/*.tar.gz
goreleaser/*.sig
goreleaser/*.zip
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -2,6 +2,7 @@ name: CI

permissions:
contents: read
id-token: write

on:
workflow_call:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/on-pr.yml
Expand Up @@ -3,6 +3,7 @@ name: Pull Request
permissions:
contents: write
pull-requests: write
id-token: write

on:
pull_request:
Expand Down Expand Up @@ -42,6 +43,7 @@ jobs:
uses: ./.github/workflows/ci.yml
permissions:
contents: read
id-token: write
with:
ref: ${{ github.ref }}
version: ${{ needs.info.outputs.version }}
Expand Down
11 changes: 11 additions & 0 deletions .goreleaser.yml
Expand Up @@ -58,6 +58,17 @@ archives:
strip_parent: true
name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"

signs:
- cmd: cosign
certificate: '${artifact}.pem'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
artifacts: binary
output: true

snapshot:
name_template: "{{ .Version }}-SNAPSHOT"

Expand Down
@@ -0,0 +1,4 @@
changes:
- type: feat
scope: ci
description: sign pulumi binaries with cosign

0 comments on commit 5ff92a4

Please sign in to comment.