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: enable artifact signing via cosign #190

Merged
merged 2 commits into from
Dec 8, 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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
# Install various tools
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '>=1.21.4'
go-version: '>=1.21.5'
cache: true
- name: setup-tparse
run: |
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
# Install Go
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '>=1.21.4'
go-version: '>=1.21.5'
cache: true
# Run linter
- name: golangci-lint
Expand All @@ -131,7 +131,7 @@ jobs:
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
cache: true
go-version: '>=1.21.4'
go-version: '>=1.21.5'
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
release-please:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
steps:
- uses: actions/create-github-app-token@2986852ad836768dfea7781f31828eb3e17990fa # v1
Expand Down Expand Up @@ -69,12 +70,14 @@ jobs:
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
if: ${{ steps.release.outputs.release_created }}
with:
go-version: '>=1.21.4'
go-version: '>=1.21.5'
cache: true
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3
if: ${{ steps.release.outputs.release_created }}
- uses: anchore/sbom-action/download-syft@fd74a6fb98a204a1ad35bbfae0122c1a302ff88b # v0.15.0
if: ${{ steps.release.outputs.release_created }}
- uses: sigstore/cosign-installer@v3
if: ${{ steps.release.outputs.release_created }}

# Login to ghcr.io
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
Expand Down
21 changes: 21 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,27 @@ archives:
sboms:
- artifacts: archive

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

docker_signs:
- cmd: cosign
artifacts: manifests
output: true
args:
- "sign"
- "${artifact}@${digest}"
- --yes

dockers:
-
id: "linux-amd64"
Expand Down