Skip to content

ci: canonical registry notify (fix dead dispatch + drop manifest-overwrite) - #37

Merged
intel352 merged 2 commits into
mainfrom
chore/canonical-registry-notify
Jun 1, 2026
Merged

intel352 merged 2 commits into
mainfrom
chore/canonical-registry-notify

Conversation

@intel352

@intel352 intel352 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Fixes two bugs in the release pipeline:

  1. Dead dispatch payload — notify-registry sent {"plugin": "GoCodeAlone/workflow-plugin-authz", ...} but the registry consumer expects a bare plugin name ("authz"). Dispatch silently no-op'd on every release.
  2. Regressing direct manifest-write — the release job cloned workflow-registry and overwrote plugins/authz/manifest.json directly, bypassing the canonical plugin-release dispatch path and using the deprecated REGISTRY_PAT secret.

Changes:

  • Removes notify-registry job entirely.
  • Removes the inline "Update registry manifest" step from the release job.
  • Adds fleet-canonical notify-workflow-registry job: repo_dispatch_token, pinned SHA (peter-evans/repository-dispatch@28959ce8... v4), bare-name payload {"plugin": "authz", "tag": "..."}, pre-release guard.

Fixes dead dispatch: plugin payload was full repo path
('GoCodeAlone/workflow-plugin-authz') but registry expects bare name ('authz').

Removes regressing direct manifest-write (git-clone + jq + push to
workflow-registry) which bypassed the canonical dispatch path and used the
deprecated REGISTRY_PAT secret.

Switches to repo_dispatch_token + pinned SHA
(peter-evans/repository-dispatch@28959ce v4).

Drops the old notify-registry job entirely; the new notify-workflow-registry
job has fleet-canonical shape with pre-release guard
(!contains(github.ref_name, '-')).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 1, 2026 05:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the release workflow to use the canonical workflow-registry update mechanism by removing direct manifest writes and replacing the old dispatch payload with a pinned, repository-dispatch based notification that sends the expected bare plugin name.

Changes:

  • Removed the in-workflow cloning/editing/PR creation flow that directly overwrote workflow-registry’s plugins/authz/manifest.json.
  • Replaced the old registry notification with a new notify-workflow-registry job that dispatches plugin-release using a pinned peter-evans/repository-dispatch SHA and a {"plugin":"authz","tag":"..."} payload.
  • Added guards to skip dispatch on tag deletion events and on pre-release tags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 52 to 53
"${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" .
- name: Update registry manifest
if: success() && env.GH_TOKEN != ''
continue-on-error: true
run: |
VERSION="${GITHUB_REF_NAME#v}"
PLUGIN_NAME="${GITHUB_REPOSITORY##*/}"
REGISTRY_NAME="${PLUGIN_NAME#workflow-plugin-}"
REGISTRY_NAME="${REGISTRY_NAME#workflow-}"
BASE_URL="https://github.com/GoCodeAlone/${PLUGIN_NAME}/releases/download/v${VERSION}/${PLUGIN_NAME}"

git clone "https://x-access-token:${REGISTRY_PAT}@github.com/GoCodeAlone/workflow-registry.git" /tmp/workflow-registry
cd /tmp/workflow-registry

MANIFEST="plugins/${REGISTRY_NAME}/manifest.json"
if [[ ! -f "${MANIFEST}" ]]; then
echo "No manifest found at ${MANIFEST}, skipping registry update."
exit 0
fi

jq --arg v "${VERSION}" \
--arg base "${BASE_URL}" \
'.version = $v |
.downloads = [
{os: "linux", arch: "amd64", url: ($base + "-linux-amd64.tar.gz")},
{os: "linux", arch: "arm64", url: ($base + "-linux-arm64.tar.gz")},
{os: "darwin", arch: "amd64", url: ($base + "-darwin-amd64.tar.gz")},
{os: "darwin", arch: "arm64", url: ($base + "-darwin-arm64.tar.gz")}
]' "${MANIFEST}" > tmp.json && mv tmp.json "${MANIFEST}"

Restore the draft->non-draft Publish step the prior commit dropped; remove only
the broken dispatch + direct manifest-write; rename notify-registry ->
publish-release; add canonical notify-workflow-registry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@intel352
intel352 merged commit 675fc7b into main Jun 1, 2026
9 checks passed
@intel352
intel352 deleted the chore/canonical-registry-notify branch June 1, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants