Releases: ylabonte/github-actions-updater
v1.2.0
Minor Changes
-
9eae823: Drop Node 20 support; require Node 22+.
Node 20 left LTS at the end of April 2026, so the project drops it from its supported runtimes. The CLI is now tested on Node 22 and Node 24, with Node 24 as the build/release default.
package.json'sengines.nodebumps from>=20.0.0to>=22.0.0.What this means in practice: the
enginesfield is advisory — npm will print a warning when installing on Node 20 but will still complete the install. Configurations withengine-strict=truewill refuse outright. The CLI itself uses no Node 22+ APIs in this release, so unaffected users on Node 20 are likely to keep working for a while — but any regression observed on Node 20 will not be treated as a bug, and CI will not catch one.What to do if you're on Node 20: upgrade your runner to Node 22 or Node 24. There are no source-level API changes in this release; the bump is policy-only.
Why this isn't a major: the
enginesfield is a soft contract, no runtime API changed, and the package is young enough that burning a 2.0.0 on a Node-support narrowing alone would make the version stream noisier than it needs to be. A loud changelog entry captures the contract change without committing the version number.
v1.1.0
Minor Changes
-
10601b3: Add config-file support via cosmiconfig.
Repo-level defaults can now live in a data-only config file at the repo root — a
ghaukey inpackage.json,.ghaurc,.ghaurc.json,.ghaurc.yaml,.ghaurc.yml, orghau.config.json. CLI flags override config values; config values override built-in defaults. Tokens are deliberately not loadable from config — they belong in env vars orgh auth token.Schema (validated by zod; unknown keys are rejected):
interface GhauConfig { target?: 'latest' | 'major' | 'minor' | 'patch' | 'greatest'; filters?: string[]; rejects?: string[]; workflowsDir?: string; allowBranchPin?: boolean; failOnOutdated?: boolean; }
Relative
workflowsDirvalues are resolved against the config file's directory (notprocess.cwd()), so a repo-level.ghaurc.jsonkeeps pointing at<repo-root>/.github/workflowsregardless of which subdirectory inside the repo you invokeghaufrom. Containment is enforced — aworkflowsDirthat is absolute (any platform-recognized form, including Windows drive-absolute and UNC even on POSIX), that contains a backslash (Windows-only separator; rejected for portability), that resolves outside the config file's directory via..-traversal, or whose realpath escapes the config tree through a symlink is rejected at load time. Repo-controlled configs can therefore only point at directories inside the repo, and behave identically on POSIX and Windows runners; operators who legitimately need an absolute path can still pass--workflowson the CLI.Rationale: a checked-in config is reachable by anyone who can land a PR, and — in
--writemode — steering the YAML rewriter outside the repo would be a real attack vector. The validation closes that vector before the scanner ever opens a file.Executable config formats (
.js,.cjs,.mjs,.ts) are intentionally not supported. Allowing them would letghauexecute repository-controlled JavaScript during config discovery — and in the composite Action path,GITHUB_TOKENis already in the process environment by the time the CLI starts, so a checked-inghau.config.mjsfrom an attacker-controlled PR could exfiltrate it. Keeping the config surface data-only eliminates that vector; an opt-in for executable formats may land in a future minor with appropriate CI safeguards. Seedocs/guide/config-file.mdfor the full rationale.Also in this release: Action-side contract changes
To make the config-file precedence work end-to-end when the tool runs as a composite Action, several Action inputs gained new "defer to config" semantics:
targetinput default changed from'latest'to an empty string. When omitted, the Action no longer forces--target lateston the CLI; the CLI then honors atargetvalue from a repo config file (or falls through to its own built-inlatestdefault if no config). Set the input explicitly to force a value over any config.workflowsinput behavior clarified. The input itself already defaulted to an empty string in 1.0.0; what's new is that an empty value now lets the CLI honorworkflowsDirfrom a repo config file (previously it just fell through to the CLI's built-in.github/workflows). The Action's metadata description has been updated to reflect this; no Action-input default change.allow-branch-pinandfail-on-outdatedinputs are now tri-state. Empty (the new default) defers to the config;'true'appends the positive CLI flag;'false'appends a new negative CLI flag (--no-allow-branch-pin/--no-fail-on-outdated) so a one-off run can override a config-settrueback tofalsewithout editing the config. Back-compat for 1.0.x pins: if a caller explicitly pinsversion: '1.0.x'and sets the tri-state input to'false', the older CLI doesn't know the negative flag and would crash. To preserve the pre-1.1 behavior (wherefalsewas effectively a no-op —falsematched the CLI's built-in default already), the Action detects a1.0.xversion pin and treatsfalseas a no-op + warning rather than emitting the new flag. Defaults (version: '1') inherit1.1.0once published and aren't affected.
The new CLI flags
--no-allow-branch-pinand--no-fail-on-outdatedare also available directly for non-Action invocations.Action users with
with: { target: latest }/with: { workflows: .github/workflows }explicitly set in their workflows are unaffected. Action users who omit those inputs will now inherit the config file's values (or fall through to the unchanged CLI defaults if no config) — the documented "Action input > config file > built-in default" precedence.
v1.0.0
Initial public release of github-actions-updater — an ncu-style CLI and composite GitHub Action for keeping the uses: references in your workflow files up to date.
CLI (ghau)
- Scans
.github/workflows/*.{yml,yaml}for outdated remoteuses:references and renders a colored summary table (or--jsonfor machine-readable output). - Reference styles supported: floating major (
@v4), floating minor (@v4.1), exact (@v4.1.1), SHA-pinned with version comment (@<sha> # v4.1.1), branch (@main— reported as mutable), Docker (docker://image:tag). Local refs (./...) are skipped. - Floating partial tags are pre-resolved:
@v4againstv4.7.0is up-to-date; only cross-track moves (v4→v5,v4.1→v4.2) are flagged. On--write, partial refs preserve their style:@v4rewrites to@v5, not@v5.0.0. -u/--writeapplies updates in place. Surgical text-splice preserves comments and formatting; no AST round-trip.-i/--interactivepicks updates from a multi-select prompt.--commitstages the rewritten files and produces agit commit -vwith a pre-filled message (first-line summary + one bullet per updated action). Combine with--no-edit(or rely on auto-detection when stdin isn't a TTY) for a fully non-interactive commit suitable for CI.- Auth chain:
--token <token>→GITHUB_TOKEN/GH_TOKENenv →gh auth token→ anonymous (60 req/hour). --targetpolicy:latest(default),major,minor,patch,greatest.--filter/--rejectwith glob patterns over action names.--fail-on-outdatedturns the scan into a CI gate. By default scans exit 0 even when outdated entries are present.- Exit codes:
0on a successful scan,1for partial resolution errors or--fail-on-outdated+ drift,2when every resolution errored (auth/network). - Cross-platform paths: POSIX-normalized in display and JSON output on every platform, including Windows.
- Display polish: green ✓ in the Δ column for up-to-date rows, yellow ⚠ for error rows.
Composite GitHub Action
github-actions-updater is also consumable as a GitHub Action wrapper around the CLI:
- uses: ylabonte/github-actions-updater@v1
with:
write: true
commit: true- Composite action; delegates to
npx github-actions-updater@<version>so the npm package stays the single source of truth (no bundled JS blob, no double-update path). - All CLI flags are mirrored as workflow inputs.
- Exposes
outdated,changes, andjsonoutputs for downstream composition. - Pairs cleanly with
peter-evans/create-pull-requestfor an auto-PR flow. - The floating
v<major>tag (e.g.v1) tracks the latest 1.x.y release automatically.
See the README's "Use as a GitHub Action" section and the extended docs for recipes (auto-PR, drift report, hard CI gate, monorepo, version pinning).
Installation
npm install -g github-actions-updater
# or
pnpm add -g github-actions-updater
# or run once
npx github-actions-updaterThe installed binary is ghau.