Skip to content

Add update-plugin-index reusable workflow#84

Merged
scotwells merged 1 commit into
mainfrom
feat/update-plugin-index
Jul 1, 2026
Merged

Add update-plugin-index reusable workflow#84
scotwells merged 1 commit into
mainfrom
feat/update-plugin-index

Conversation

@scotwells

@scotwells scotwells commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Automates keeping the datumctl plugin catalog in sync with service releases.

Today, after a service publishes a release, someone hand-edits the plugin manifest in the catalog (plugins/<name>.yaml) to bump the version and paste in the new download URLs and checksums. This reusable workflow does that automatically.

What it does

Given a plugin name, a catalog repo, and a release tag, it:

  • Downloads the release’s checksums.txt.
  • Sets spec.version to the release tag.
  • For every platform in the manifest, rewrites the download uri to the new tag and refreshes sha256 from checksums.txt.
  • Opens a PR against the catalog repo. The catalog’s existing CI validates the schema, resolves every URL, and verifies every checksum; its generator regenerates index.yaml on merge.

It fails loudly if checksums.txt is missing or an expected archive is not listed in it.

Generic across plugins

The archive→checksum mapping is driven entirely off the basenames of the manifest’s existing platforms[].uri values (goreleaser archive names carry no version, so basenames are stable across releases). Nothing about a specific plugin — name, prefix, or archive layout — is hardcoded.

Interface

Inputs: index-repo (required), plugin-name (required), version (required), plugin-file (default plugins/<plugin-name>.yaml), release-repo (default: calling repo), base-branch (default main).

Secret: PLUGIN_INDEX_TOKEN (required) — a PAT or GitHub App token with contents:write + pull-requests:write on the catalog repo. A caller’s built-in GITHUB_TOKEN is scoped to its own repo and cannot open a cross-repo PR.

Notes

  • Manifest edits preserve existing formatting, comments, and quoting (round-tripped via ruamel.yaml); the diff is limited to version, URLs, and checksums.
  • Docs added under docs/update-plugin-index/.
  • The first consumer is milo-os/ipam, which references this branch until a tagged release is cut.

Cut a new release tag after merge so consumers can pin a version.

Related work

Opens a PR against a datumctl plugin catalog whenever a service repo
publishes a release, bumping the plugin manifest to the new version:
sets spec.version, rewrites each platform download URL to the new tag,
and refreshes each sha256 from the release checksums.txt.

The archive-to-checksum mapping is driven off the basenames of the
manifest's existing platforms[].uri values, so it is generic across
plugins. index.yaml regeneration is left to the catalog's own generator.
@scotwells scotwells merged commit e72fc93 into main Jul 1, 2026
3 checks passed
@scotwells scotwells deleted the feat/update-plugin-index branch July 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