ci, action: tag-only image publish, nu tasks, 0.9.0 action cutover
Three CI and action fixes.
Release image job: write permissions only on tags
The image job also ran on pull requests that touch the image, with packages: write, id-token: write and attestations: write, while it ran the PR's image:build and image:smoke. Now:
image(still named "Container image") builds and smoke-tests withcontents: readonly. On a tag it uploads whatimage:pushneeds as theimageartifact:image.tar(the index the smoke test ran), the apk cache, the local packages and the SBOMs.image-publishruns only on push (tags). It downloads that artifact, logs in to GHCR, runsimage:pushand attests. It is the only job with the package, OIDC and attestation write permissions.image:pushstill refuses to publish an index other than the tested one.releasenow needsimage-publishand downloads only thedist-*artifacts, so the image artifact never ends up as a release asset.
No new actions, so actions.lock needs no change.
Workflow shell moved into nu tasks
release:check-tag <tag>reads patchula-cli's version fromcargo metadata --lockedinstead of picking apartcargo pkgidoutput.release:smoke <platform>unpacks the platform's archive and checks thatpatchula --versionmatches the archive's version exactly (before, it only checked for some semver). The smoke job now checks out the repo and installs nu through mise to run it.action:pin-releaselooks up the latest release, writes its schema over thetests/action/PatchulaConfig.pklsymlink and setsversioninGITHUB_OUTPUT. It clearsMISE_ENABLE_TOOLSfor its ownmise exec, and the workflow sets that variable only on the steps that need it, so the composite action'smise execnever inherits it.
The composite action.yml keeps its bash run: steps, because it runs in other repositories where this repo's tasks don't exist.
Tested locally: release:check-tag passes on v0.9.0 and fails on v0.8.0. release:smoke passes on the real v0.9.0 linux-x64-musl archive and fails when the archive is missing. action:pin-release with stand-in env vars pinned 0.9.0, wrote the schema in place of the symlink and left the root PatchulaConfig.pkl untouched. nu-lint, jactionlint and zizmor are clean.
action.yml: hard cutover to 0.9.0+
I removed the fallback that passed --cache as the SQLite file (releases up to 0.4.0) and the one that keyed the cache by version for releases without patchula cache schema. 0.9.0 is the first release with cache schema (#325). If the installed binary has no working cache schema, whether it came from version or binary, the action now fails the step with an error that names the binary and asks for 0.9.0 or later. The cache key format (…-s<schema>-…) is unchanged, so existing caches still restore. The inputs' descriptions and guide/github-actions.md now give the minimum version.
Follow-ups (not in this PR)
- The threat model and lockfile guide contradict each other on lockfile tools running repository code. That is fixed by making the tools stop running it, in a separate PR, not by an exception in the threat model.
- nix gets the installation token (
github_token()), not a repository-scoped one. It runs no repository code, but the "credential no wider than its reach" rule may call for a scoped token there, as gh-actions-lock gets. - Nothing dropped.