Skip to main content

GitHub Actions CLI - allows updating workflows, etc.

Project description

GitHub Actions CLI

A CLI tool for keeping GitHub Actions workflow files up to date. It works with both local repository clones and remote GitHub repositories.

Installation

pip install github-actions-cli

Or run without installing via uvx:

uvx github-actions-cli

Quick start

Run inside any local GitHub repository clone to see which actions have updates available:

github-actions-cli
GitHub Actions CLI, scanning repo in /path/to/repo
.github/workflows/test.yml (Test):
    actions/checkout          v2 ==> v3
    actions/setup-python      v3 ==> v4
    release-drafter/release-drafter  v5
.github/workflows/publish.yml (Publish):
    pypa/gh-action-pypi-publish  v1
    actions/checkout          v2 ==> v3

Actions with an ==> have a newer version available. To apply the updates, add --update:

github-actions-cli --update

GitHub token

A GITHUB_TOKEN is required to query the GitHub API for the latest action versions. Set it as an environment variable or pass it with --github-token.

export GITHUB_TOKEN=ghp_...
github-actions-cli

Writing changes to a remote repository also requires the token to have commit permissions on that repository.

Commands

update-actions (default)

Lists actions that have updates available. Pass --update (-u) to apply the changes.

# Check for updates in the current directory
github-actions-cli

# Apply updates to local workflow files
github-actions-cli --update

# Check and update a remote repository
github-actions-cli --repo cunla/fakeredis update-actions --update

# Use a custom commit message when updating a remote repository
github-actions-cli --repo cunla/fakeredis update-actions --update -commit-msg "chore: update actions"
Usage: github-actions-cli update-actions [OPTIONS]

Options:
  -u, --update      Apply updates to workflow files. For remote repos this
                    creates a commit; for local repos it writes the files.
  -commit-msg TEXT  Commit message (remote repos only).
                    [default: chore(ci):update actions]
  --help            Show this message and exit.

list-workflows

Lists all workflow files found in a repository.

github-actions-cli list-workflows
github-actions-cli --repo cunla/fakeredis list-workflows
.github/workflows/test.yml - Test
.github/workflows/publish.yml - Publish

list-actions

Lists every action referenced in a specific workflow file.

github-actions-cli list-actions .github/workflows/test.yml
github-actions-cli --repo cunla/fakeredis list-actions .github/workflows/test.yml
actions/checkout@v3
actions/setup-python@v4
release-drafter/release-drafter@v5

analyze-orgs

Scans all GitHub organizations the authenticated user belongs to and prints a CSV summary of their repositories.

github-actions-cli analyze-orgs
github-actions-cli analyze-orgs --exclude my-org --exclude another-org

Global options

Usage: github-actions-cli [OPTIONS] COMMAND [ARGS]...

Options:
  --repo TEXT           Repository to scan. Accepts a local path or
                        owner/repo format.  [default: .]
  --github-token TEXT   GitHub token. Falls back to the GITHUB_TOKEN
                        environment variable.
  -m, --major-only      Only flag updates across major versions (e.g. v1 →
                        v2). Minor and patch bumps are ignored.
  -v, --verbose         Increase output verbosity. Pass twice for debug output.
  --help                Show this message and exit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

github_actions_cli-1.2.4.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

github_actions_cli-1.2.4-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file github_actions_cli-1.2.4.tar.gz.

File metadata

  • Download URL: github_actions_cli-1.2.4.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for github_actions_cli-1.2.4.tar.gz
Algorithm Hash digest
SHA256 8de0fa06f4c3887c3723c581c4f889c78c3489141157555c9fe5731270ecd3c4
MD5 c6af6d69d8ec0c6f409d9fa045e803cc
BLAKE2b-256 c7be6dc287d28ee9c06fb7bec34dddeda16e36f5eda89bdf70a2af3a56e73341

See more details on using hashes here.

Provenance

The following attestation bundles were made for github_actions_cli-1.2.4.tar.gz:

Publisher: publish.yml on dsoftwareinc/github-actions-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file github_actions_cli-1.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for github_actions_cli-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ebea0f5e5d8a54b50e44d1698dd2cf5aa69284e259359cc540c80022e8fb19fb
MD5 818c35ef78ff77e4af8d42611b644207
BLAKE2b-256 58302ef045ac72f365e5113d08f0aff1e3a380dfc4aa1cba8918e51dd38ebae3

See more details on using hashes here.

Provenance

The following attestation bundles were made for github_actions_cli-1.2.4-py3-none-any.whl:

Publisher: publish.yml on dsoftwareinc/github-actions-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page