diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 479f6c1e..84affc1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -237,9 +237,17 @@ jobs: name: release-${{ needs.release.outputs.version }} path: _output/release + # The cosign versions.yaml pins, which internal/release's checks build with go run: the + # installer's own default moves with its pin, and this keeps one version for both. + - name: Cosign's version + id: cosign + run: task pin NAME=cosign + # v4 is the one that installs cosign v3. Dependabot moves this pin like every other `uses:`. - name: Install cosign uses: sigstore/cosign-installer@881c63bd87e38389154debd8331404ce7ca8a3ab # v4.1.4 + with: + cosign-release: ${{ steps.cosign.outputs.version }} # Who built each file and from what - this workflow at this commit, every pin in # versions.yaml - as SLSA provenance, beside the signature that says who made it. The @@ -324,8 +332,14 @@ jobs: - name: Build the traceable kernel run: spin-machine-dev release traceable-kernel --version "$VERSION" --cache-registry --cache-export=false + - name: Cosign's version + id: cosign + run: task pin NAME=cosign + - name: Install cosign uses: sigstore/cosign-installer@881c63bd87e38389154debd8331404ce7ca8a3ab # v4.1.4 + with: + cosign-release: ${{ steps.cosign.outputs.version }} - name: Write the provenance run: spin-machine-dev release provenance --version "$VERSION" diff --git a/Taskfile.yml b/Taskfile.yml index e8e49a93..9095afd6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -79,6 +79,16 @@ tasks: cmds: - '{{.SPIN_MACHINE_DEV}} {{.CLI_ARGS}}' + pin: + desc: The version versions.yaml pins for NAME, said and, in a workflow, the step's output `version`, for an action that installs it (task pin NAME=cosign). + requires: + vars: [NAME] + cmds: + - | + v=$(versions version {{.NAME}}) + echo "$v" + if [ -n "${GITHUB_OUTPUT:-}" ]; then echo "version=$v" >> "$GITHUB_OUTPUT"; fi + # The probes' (boot/) spin-machine, which every one of them boots with: the verb, under the # name their targets depend on. tools: diff --git a/versions.yaml b/versions.yaml index b506f03a..b7064859 100644 --- a/versions.yaml +++ b/versions.yaml @@ -551,5 +551,6 @@ internal/release's Fetch and Signed check every published file this repository fetches with it, built by go run (boot:here on the KVM runner, which has no envsubst for sigstore/cosign-installer to run; lab; osv and cves). The workflows that sign install cosign - with that action, whose pin Dependabot moves; keep the two at one version. A bump is checked - with task boot:here. + with that action at this version (task pin NAME=cosign hands it cosign-release), so the + action's pin, which Dependabot moves, moves the action and not cosign. A bump is checked with + task boot:here.