Local read-only scanner for GitHub Actions deprecation and runtime migration risks.
Project description
GitHub Actions Deprecation Preflight
Read-only scanner for GitHub Actions workflow files, local JavaScript action metadata, and Markdown workflow snippets. It is meant to catch CI migration risks before they become broken builds or surprise release blockers.
Use it when a repository is preparing for GitHub Actions action-major upgrades, Node runtime changes, artifact/cache migrations, or runner-image cleanup.
What this catches
Current v1 rules flag or review:
- retired/deprecated artifact actions:
actions/upload-artifact@v3,actions/download-artifact@v3; - older action majors that often need migration review:
actions/cache@v3,actions/checkout@v3,actions/setup-node@v3; - local JavaScript actions using old runtimes such as
runs.using: node16; - local JavaScript actions using
node20as a low-severity future runtime review signal; - workflow snippets inside Markdown docs, not only
.github/workflows/*.yml.
It is intentionally narrow: this is a preflight checklist/scanner, not an automatic migration tool.
60-second quick start
python3 -m pip install github-actions-deprecation-preflight
gha-deprecation-preflight . --format markdown --output gha-deprecation-report.md
gha-deprecation-preflight . --format json --output gha-deprecation-report.json
gha-deprecation-preflight . --fail-on-severity high
Short alias:
gha-deprecation-preflight path/to/repo --min-severity high
PyPI: https://pypi.org/project/github-actions-deprecation-preflight/
Example: failing workflow → finding → fix
Risky workflow snippet:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- run: npm ci && npm test
- uses: actions/upload-artifact@v3
with:
name: test-output
path: test-results/
Scanner finding excerpt:
- high `upload-artifact-v3`
- Signal: `- uses: actions/upload-artifact@v3`
- Why: upload-artifact v3 is retired/deprecated; workflows should move to the current major.
- Fix: Upgrade to actions/upload-artifact@v4 and review changed artifact behavior, overwrite/merge assumptions, and retention settings.
Safer migration direction:
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- uses: actions/upload-artifact@v4
with:
name: test-output
path: test-results/
if-no-files-found: warn
Review current example fixtures and generated reports:
examples/node-runtime-risk/examples/ubuntu-runner-risk/examples/artifact-cache-risk/examples/sample-report.mdexamples/sample-report.json
CI usage
See docs/CI_USAGE.md for report-only, high-risk gate, and scoped rollout examples.
Minimal report-only GitHub Actions step:
- name: GitHub Actions deprecation preflight
run: |
python -m pip install github-actions-deprecation-preflight
gha-deprecation-preflight . --format markdown --output gha-deprecation-report.md
Try from a clone
python3 scanner.py examples
python3 scanner.py examples --format json
python3 scanner.py examples --output report.md
python3 scanner.py examples --fail-on-severity high
python3 scanner.py examples --min-severity high
python3 scanner.py examples --only-rule upload-artifact-v3
python3 scanner.py --list-rules
python3 scanner.py --list-rules --format json
python3 scanner.py examples --ignore-rule local-action-node20-review
Example output:
# GitHub Actions Deprecation Preflight
Scanned files: 6
Active rules: 7
Findings: 13
Intended workflow
- Run the scanner at a repository root.
- Review high-severity findings first, especially retired artifact actions and old local JavaScript runtimes.
- Use
--min-severity highfor a high-risk-only report,--only-rulewhile validating one migration family, or--ignore-rulefor a documented false-positive/noise window. - Upgrade action majors on a branch.
- Verify workflow behavior before merging.
Safe by default
- Read-only local scan.
- No GitHub API calls.
- No GitHub token required.
- No workflow upload or telemetry.
- No automatic migrations or commits.
- CI failure is opt-in via
--fail-on-severity. - Rule filtering is explicit and local; unknown rule ids fail fast instead of silently changing coverage.
--list-rulescan be used to review active rule coverage before adding the scanner to CI.
Related Engineering Risk Preflight tools
- Repository Hygiene / CI Risk Preflight — broader repo/package/release-readiness checks.
- Zod OpenAPI Contract Lint Kit — API contract drift checks for Zod/OpenAPI projects.
- Playwright Flake Triage Toolkit — local triage for flaky Playwright reports and CI logs.
For AI agents and automation
Use JSON mode as the stable machine interface:
gha-deprecation-preflight . --format json --output gha-deprecation-report.json --quiet --no-color
Machine contract: schemas/report.schema.json (schema_version: 1.0). Findings include rule id, severity, file/line, matched signal, fix guidance, and stable fingerprints for reruns. GitHub annotation output is available with --format annotations.
Exit codes: 0 completed/report-only, 1 configured severity gate matched, 2 usage/config/rule-id error, 3 reserved for runtime/tool errors.
Agent workflow docs: docs/AGENT_INTEGRATION.md.
Roadmap
- Expand the rule inventory as GitHub Actions deprecations change.
- Add more fixtures for common workflow patterns.
- Expand CI adoption examples and release notes.
- Keep the default mode deterministic, local, and read-only.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file github_actions_deprecation_preflight-0.1.2.tar.gz.
File metadata
- Download URL: github_actions_deprecation_preflight-0.1.2.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a0d9118cb895c205d03f81c66f4ab005a431a644e323ac3c796b7f3f12e013e
|
|
| MD5 |
e5ef198a024a309f8c02e546db37e245
|
|
| BLAKE2b-256 |
168c1a6633115506994ece381158ac3b98afab63cd4c7f009c2eac45194655e6
|
Provenance
The following attestation bundles were made for github_actions_deprecation_preflight-0.1.2.tar.gz:
Publisher:
publish.yml on vasiliy0/github-actions-deprecation-preflight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
github_actions_deprecation_preflight-0.1.2.tar.gz -
Subject digest:
4a0d9118cb895c205d03f81c66f4ab005a431a644e323ac3c796b7f3f12e013e - Sigstore transparency entry: 1585052762
- Sigstore integration time:
-
Permalink:
vasiliy0/github-actions-deprecation-preflight@1feef2c5e46b5d91389eb26a13a31fa5d811a622 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vasiliy0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1feef2c5e46b5d91389eb26a13a31fa5d811a622 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file github_actions_deprecation_preflight-0.1.2-py3-none-any.whl.
File metadata
- Download URL: github_actions_deprecation_preflight-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ed01ec0796f5873c225ff1e5d1950a466b336e7273b2f95da68d59cdb70b657
|
|
| MD5 |
aec82412733422282e786a6cef4896d8
|
|
| BLAKE2b-256 |
4fc3621f25b81fa16e3b4b6381d5c6016ff67515e7331fe853c6f8020b390ae4
|
Provenance
The following attestation bundles were made for github_actions_deprecation_preflight-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on vasiliy0/github-actions-deprecation-preflight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
github_actions_deprecation_preflight-0.1.2-py3-none-any.whl -
Subject digest:
4ed01ec0796f5873c225ff1e5d1950a466b336e7273b2f95da68d59cdb70b657 - Sigstore transparency entry: 1585052897
- Sigstore integration time:
-
Permalink:
vasiliy0/github-actions-deprecation-preflight@1feef2c5e46b5d91389eb26a13a31fa5d811a622 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vasiliy0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1feef2c5e46b5d91389eb26a13a31fa5d811a622 -
Trigger Event:
workflow_dispatch
-
Statement type: