Skip to main content

GitHub Actions CLI - allows updating workflows, etc.

Project description

GitHub Actions CLI

The purpose of this tool is to work with your GitHub Actions workflows in your repositories. It is complementary to the GitHub CLI.

So far, three main flows are supported:

List all workflows path and name in a specified repository.

Example:

github-actions-cli cunla/fakeredis list-workflows

will return:

.github/workflows/publish.yml:Upload Python Package
.github/workflows/test.yml:Unit tests
dynamic/github-code-scanning/codeql:CodeQL
dynamic/pages/pages-build-deployment:pages-build-deployment

List all actions uses in a workflow

Given a repo and a workflow path, return all actions in the workflow.

Example:

github-actions-cli cunla/fakeredis list-actions .github/workflows/publish.yml

Result

pypa/gh-action-pypi-publish@release/v1
actions/checkout@v3
actions/setup-python@v4

Update all actions in a repository workflow(s)

Show the latest versions of actions used in a repository workflow.

Example:

github-actions-cli cunla/fakeredis update

Result:

.github/workflows/publish.yml
  actions/setup-python @ v4     ==> v4.7.0
  pypa/gh-action-pypi-publish @ release/v1      ==> v1.8.8
  actions/checkout @ v3         ==> v3.5.3
.github/workflows/test.yml
  actions/setup-python @ v4     ==> v4.7.0
  release-drafter/release-drafter @ v5  ==> v5.24.0
  actions/checkout @ v3         ==> v3.5.3

Installation

pip install github-actions-cli

Help messages

usage: github-actions-cli [-h] [--github-token GITHUB_TOKEN] repo {list-workflows,list-actions,update} ...

positional arguments:
  repo                  Repository to analyze
  {list-workflows,list-actions,update}
    list-workflows      List github workflows
    list-actions        List actions in a workflow
    update              Update actions in github workflows

options:
  -h, --help            show this help message and exit
  --github-token GITHUB_TOKEN
                        GitHub token to use, by default will use GITHUB_TOKEN environment variable

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.0.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

github_actions_cli-1.0.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

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