chore(deps): Bump github.com/sigstore/cosign/v2 from 2.2.3 to 2.2.4 (… #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cut Release | |
on: | |
push: | |
tags: | |
- "v*" | |
concurrency: cut-release | |
permissions: | |
contents: write # needed to write releases | |
id-token: write # needed for keyless signing | |
packages: write # needed for pushing the images to ghcr.io | |
jobs: | |
release: | |
outputs: | |
hashes: ${{ steps.hash.outputs.hashes }} | |
tag_name: ${{ steps.tag.outputs.tag_name }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version-file: './go.mod' | |
check-latest: true | |
- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 | |
- uses: anchore/sbom-action/download-syft@ab5d7b5f48981941c4c5d6bf33aeb98fe3bae38c # v0.15.10 | |
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6 | |
- name: Set up Cloud SDK | |
uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2 | |
with: | |
workload_identity_provider: 'projects/498091336538/locations/global/workloadIdentityPools/githubactions/providers/sigstore-policy-controller' | |
service_account: '[email protected]' | |
- name: 'Set up Cloud SDK' | |
uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0 | |
- name: creds | |
run: gcloud auth configure-docker --quiet | |
- name: Set LDFLAGS | |
id: ldflags | |
run: | | |
source ./release/ldflags.sh | |
goflags=$(ldflags) | |
echo "GO_FLAGS="${goflags}"" >> "$GITHUB_ENV" | |
- name: Set tag output | |
id: tag | |
run: echo "tag_name=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT" | |
- name: Run GoReleaser | |
id: run-goreleaser | |
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 | |
with: | |
version: latest | |
args: release --rm-dist --timeout 120m | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
LDFLAGS: ${{ env.GO_FLAGS }} | |
- name: Generate subject | |
id: hash | |
env: | |
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}" | |
run: | | |
set -euo pipefail | |
checksum_file=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Checksum") | .path') | |
echo "hashes=$(cat $checksum_file | base64 -w0)" >> "$GITHUB_OUTPUT" | |
- name: copy-signed-release-to-ghcr | |
run: make copy-signed-release-to-ghcr || true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
provenance: | |
needs: [release] | |
permissions: | |
actions: read # To read the workflow path. | |
id-token: write # To sign the provenance. | |
contents: write # To add assets to a release. | |
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | |
with: | |
base64-subjects: "${{ needs.release.outputs.hashes }}" | |
upload-assets: true # upload to a new release | |
upload-tag-name: "${{ needs.release.outputs.tag_name }}" |