feat(cg-actions): source-aware version check (registry vs GitHub)#3
Open
tylerpaxton wants to merge 1 commit into
Open
feat(cg-actions): source-aware version check (registry vs GitHub)#3tylerpaxton wants to merge 1 commit into
tylerpaxton wants to merge 1 commit into
Conversation
check_version.py now detects how the skill was installed and checks the matching update channel: - Installed via Chainguard Agent Skills (chainctl skills install): files resolve under an `.agents/skills/` dir (often a symlink), so it queries the registry with `chainctl skills versions chainguard/chainguard-dev/cg-actions` and, if behind, suggests re-running the chainctl install. - Installed from GitHub (clone/download): compares against VERSION in chainguard-dev/cg-skills and suggests downloading the latest. If the detected source is unreachable it falls back to the other, and CG_ACTIONS_UPDATE_SOURCE=registry|github forces a choice. Version comparison is now semver-aware (1.10.1 > 1.2.0). Non-blocking as before. Bump VERSION to 1.3.0. Co-Authored-By: Claude Opus 4.8 <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.
Summary
Makes
cg-actions' update check aware of how the skill was installed, so it points users at the right update channel.chainctl skills install ...): the files resolve under an.agents/skills/directory (usually a symlink), so the check queries the registry —chainctl skills versions chainguard/chainguard-dev/cg-actions— and, if behind, suggests re-running the chainctl install..skill): compares againstVERSIONin this repo and suggests downloading the latest.If the detected source is unreachable, it falls back to the other one.
CG_ACTIONS_UPDATE_SOURCE=registry|githubforces a choice. Version comparison is now semver-aware (1.10.1 > 1.2.0). Still non-blocking and silent on any network/auth failure.Bumps
VERSIONto 1.3.0.How detection works
chainctl skills installwrites a canonical copy under.agents/skills/<name>/and symlinks each agent's skills dir to it. The script resolves its own path; if it runs through.agents/skills/(or the skill dir is a symlink), it treats the registry as the source of truth, otherwise GitHub.Separate from #2 (README install wording); this is the checker logic only.
🤖 Generated with Claude Code