Skip to content

Commit c2bd798

Browse files
authored
ci: wire wfctl plugin verify-capabilities + bump wfctl pin to v0.63.1 (workflow#765) (#21)
Layer 3b extension from workflow#765 sweep. Adds post-goreleaser `wfctl plugin verify-capabilities` step to release.yml; bumps Install wfctl pin v0.62.0 → v0.63.1 (carries the new subcommand). jq filter selects this plugin's linux/<runner-arch> binary from `dist/artifacts.json`; skip-with-warning if no match. Closes the runtime truth-loop on releases: validate-contract (static) + verify-capabilities (runtime) confirm both the source-tree shape AND the actual built binary's GetManifest match plugin.json.
1 parent 0581458 commit c2bd798

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ jobs:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
GOPRIVATE: github.com/GoCodeAlone/*
3232
GONOSUMCHECK: github.com/GoCodeAlone/*
33+
# workflow#765: runtime truth-check via plugin verify-capabilities.
34+
- name: Verify capabilities (runtime truth-check)
35+
run: |
36+
RUNNER_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
37+
BIN=$(jq -r --arg arch "$RUNNER_ARCH" \
38+
'[.[] | select(.type=="Binary" and .goos=="linux" and .goarch==$arch and (.name|startswith("workflow-plugin-github")))] | .[0].path // ""' \
39+
dist/artifacts.json)
40+
if [ -z "$BIN" ] || [ "$BIN" = "null" ]; then
41+
echo "::warning::No matching linux/$RUNNER_ARCH binary in dist/artifacts.json; skipping verify-capabilities"
42+
jq '.[] | {name, type, goos, goarch, path}' dist/artifacts.json
43+
exit 0
44+
fi
45+
"${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" .
3346
- name: Verify shipped plugin.json carries tag (post-build)
3447
run: |
3548
if [ -f .release/plugin.json ]; then

0 commit comments

Comments
 (0)