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.
Basic usage
Run github-actions-cli
within a directory which has a clone of a GitHub repository.
The tool will list the GitHub actions workflows, the actions they use, the current versions they use, and the latest
versions of the actions.
./.github/workflows/test.yml:
actions/checkout v3 ==> v3.5.3
release-drafter/release-drafter v5 ==> v5.24.0
actions/setup-python v4 ==> v4.7.0
./.github/workflows/publish.yml:
pypa/gh-action-pypi-publish release/v1 ==> v1.8.8
actions/checkout v3 ==> v3.5.3
actions/setup-python v4 ==> v4.7.0
Supported use cases
Usage: github-actions-cli [OPTIONS] COMMAND [ARGS]...
Options:
-repo TEXT Repository to analyze, can be a local directory or a
{OWNER}/{REPO} format [default: .]
--github-token TEXT GitHub token to use, by default will use GITHUB_TOKEN
environment variable
--help Show this message and exit.
Commands:
list-actions List actions in a workflow
list-workflows List workflows in repository
update-actions Show actions required updates in repository workflows
update-actions
List all actions that are out of date in a repository (Default)
List the latest versions of actions used in a repository workflows and potentially update the workflow files.
For example, running github-actions-cli
without any parameters will look for workflows in the
current directory (.
), check whether there are updates required for the actions in the workflows
it finds.
Another example, running on a remote repository, github-actions-cli -repo cunla/fakeredis update-actions -u
,
will look for the latest versions of the actions used in the repository cunla/fakeredis, and because of the -u
flag, it will create a commit updating the workflows to the latest.
Note: Having
GITHUB_TOKEN
with permissions to make commits on the repository is required in order to write to repository.
Parameters:
Usage: cli.py update-actions [OPTIONS]
Show actions required updates in repository workflows
Options:
-u, --update Do not update, list only
-commit-msg TEXT Commit msg, only relevant when remote repo
list-workflows
List all workflows path and name in a specified repository.
Example:
github-actions-cli -repo cunla/fakeredis list-workflows
will return:
.github/workflows/publish.yml
.github/workflows/test.yml
list-actions
List all actions uses
in a workflow
Given a repo and a workflow path, return all actions in the workflow.
Example:
github-actions-cli -repo cunla/fakeredis list-actions .github/workflows/test.yml
Result
actions/checkout@v3
./.github/actions/test-coverage
release-drafter/release-drafter@v5
actions/setup-python@v4
Installation
pip install github-actions-cli
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
File details
Details for the file github_actions_cli-1.1.0.tar.gz
.
File metadata
- Download URL: github_actions_cli-1.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 996179e63a3a56ff245be6e5d13ef55b8fbd76c006f7c2f2219f87f264512070 |
|
MD5 | 3bcccd8672e1f89a63b31315f202d59c |
|
BLAKE2b-256 | ce5a74b993e2596f7d0e7a843023cee56ab1755d62c35222bdcef18aee968207 |
File details
Details for the file github_actions_cli-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: github_actions_cli-1.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b103a29f8d87a46d085f026560837a49ccd8632c702b8cae96ce301b84ab46c9 |
|
MD5 | 4560ce62a1b8eeaa7c6a337526a49240 |
|
BLAKE2b-256 | d9db8ae190ad38bf804a263ee3dfbbe70346946704fec284b58cddbfcd25cf8b |