Repository navigation
ci: canonical registry notify (fix dead dispatch + drop manifest-overwrite) - #37
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
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’splugins/authz/manifest.json. - Replaced the old registry notification with a new
notify-workflow-registryjob that dispatchesplugin-releaseusing a pinnedpeter-evans/repository-dispatchSHA 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two bugs in the release pipeline:
notify-registrysent{"plugin": "GoCodeAlone/workflow-plugin-authz", ...}but the registry consumer expects a bare plugin name ("authz"). Dispatch silently no-op'd on every release.releasejob clonedworkflow-registryand overwroteplugins/authz/manifest.jsondirectly, bypassing the canonicalplugin-releasedispatch path and using the deprecatedREGISTRY_PATsecret.Changes:
notify-registryjob entirely.releasejob.notify-workflow-registryjob:repo_dispatch_token, pinned SHA (peter-evans/repository-dispatch@28959ce8...v4), bare-name payload{"plugin": "authz", "tag": "..."}, pre-release guard.