Skip to content

ci: add script to check and update action versions - #181

Closed
ifduyue wants to merge 1 commit into
masterfrom
ci/update-actions-script
Closed

ci: add script to check and update action versions#181
ifduyue wants to merge 1 commit into
masterfrom
ci/update-actions-script

Conversation

@ifduyue

@ifduyue ifduyue commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Add a utility script that checks every uses: reference in .github/workflows/ against the latest stable release of the upstream action, and can rewrite outdated/unpinned references in place.

Usage

python3 .github/scripts/update_actions.py --check            # report only; exit 1 if outdated
python3 .github/scripts/update_actions.py --update           # rewrite files in place
python3 .github/scripts/update_actions.py --update --dry-run # preview changes
python3 .github/scripts/update_actions.py --path <path>      # scan a specific file/dir

Behavior

  • Resolves the latest stable vX.Y.Z tag of each action via git ls-remote (no auth needed); annotated tags are resolved to their peeled commit SHA.
  • Reports up to date / OUTDATED / UNPINNED / ERROR, skipping docker://, ./, and ../ references.
  • Updates follow the repo convention: owner/repo@<full-sha> # vX.Y.Z, preserving indentation and list-item syntax.
  • Verified end-to-end against a fixture file (check → dry-run → update → re-check), and against the current workflows (all 21 references up to date).

Scan .github/workflows for uses: references, compare against the
latest stable release of each upstream action, and optionally
rewrite pins to the full commit SHA (owner/repo@<sha> # vX.Y.Z).

Usage: update_actions.py [--check|--update] [--dry-run] [--path ...]
@codspeed-hq

codspeed-hq Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 148 untouched benchmarks
⏩ 66 skipped benchmarks1


Comparing ci/update-actions-script (188c81e) with master (cb5ce9f)

Open in CodSpeed

Footnotes

  1. 66 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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.

1 participant