…ion, validation)
Addresses the #1268 review:
- (bug) SHA512 step had no pipefail, so a missing tag (curl 404 -> empty stream)
hashed to the empty-string SHA512 (128 chars) and passed the length guard,
silently recording a bad hash. Now: set -euo pipefail, download to a file (curl -f
fails the step on 404), and explicitly reject the empty-stream hash.
- (security) the workflow_dispatch `version` input was interpolated as ${{ }} into
the shell body (command injection). Pass it via env and reference $INPUT_VERSION.
- (robustness) validate the version is X.Y.Z up front; malformed input now fails fast
instead of producing partial sed edits. This also makes all downstream values safe
to embed.
- (robustness) re-publishing an existing version now drops the stale versions[] entry
before inserting, so the git-tree can't go inconsistent.
- (validation) the publish run now builds + installs the updated port via vcpkg
(overlay) before opening the PR, so the auto-PR is known-good even though a
GITHUB_TOKEN-opened PR doesn't auto-trigger the separate registry check; the PR body
now says so explicitly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follow-up to #1267 (the vcpkg registry). Replaces the manual "publish a new version" recipe with a workflow, so bumping the registry to a new collector version is one tag push, not a checklist to remember.
.github/workflows/hsm-collector-registry-publish.yml— on acollector-v<semver>tag push (or manual dispatch):ports/hsm-collector/(portfileREF+SHA512,vcpkg.jsonversion),versions/(baseline + version→git-tree),hsm-collector-registrylane before a human merges.Manual dispatch defaults to
dry_run(shows the computed diff, no PR). Inert until triggered.Note: the auto-opened PR is created with
GITHUB_TOKEN, so the registry check may need a manual re-trigger on it (GitHub suppresses workflow-on-workflow triggers); the PR body says so. A repo PAT would remove that step if desired.🤖 Generated with Claude Code