← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

actions-updater

当用户要求“更新GitHub Actions”、“检查操作更新”、“升级工作流操作”、“将操作更新到最新版本”、“用其他工具替换dependabot进行操作更新”、“检查过时的操作”,或者希望在工作流文件中查找过时的GitHub Actions并将其更新到最新发布版本时,应使用此技能。

person作者: jakexiaohubgithub

GitHub Actions Version Updater

Update GitHub Actions in workflow files to their latest released versions. Replaces Dependabot's package-ecosystem: "github-actions".

Step 1: Check for updates

Run the bundled script to parse all uses: lines and query each action's latest release:

uv run actions-updater/scripts/check_updates.py            # scans .github/workflows/
uv run actions-updater/scripts/check_updates.py path.yaml  # specific file(s)

The script parses workflow YAML, recursively extracts all uses: owner/repo@version entries (handles composite actions and matrix jobs), queries gh release view --repo owner/repo for each, and prints a comparison table. Skips local actions (./...) and Docker actions (docker://...). Requires authenticated gh CLI — unauthenticated calls hit a 60 req/hr GitHub limit and the script will fail noisily on rate-limited repos.

Step 2: Update workflow files

For each action with an available update, edit the workflow file. Pin policy, in priority order:

  1. SHA pins (e.g. @a1b2c3...) — never auto-update. Flag them and stop. SHAs are pinned for supply-chain reasons; bumping them silently defeats the purpose.
  2. Major-version pins (e.g. @v3) — update to the new major only (e.g. v4.2.1 released → write @v4). Don't pin to the patch version; the user opted into floating majors.
  3. Exact pins (e.g. @v3.1.0) — update to the full latest release tag.

Note: some actions (e.g. actions/checkout) move major tags without cutting a GitHub release. The script handles that case but won't surface intermediate patches.

Step 3: Summarise

Present a table of updates applied: action, old version, new version. Call out any SHA-pinned entries that were flagged and skipped.