github-actions-cli


Namegithub-actions-cli JSON
Version 1.1.6 PyPI version JSON
download
home_pagehttps://github.com/dsoftwareinc/github-actions-cli
SummaryGitHub Actions CLI - allows updating workflows, etc.
upload_time2024-12-11 21:50:03
maintainerDaniel Moran
docs_urlNone
authorDaniel Moran
requires_python<4.0,>=3.9
licenseBSD-3-Clause
keywords github actions cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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.

```text
./.github/workflows/test.yml:
	actions/checkout                  v2 ==> v3
	release-drafter/release-drafter    v5
	actions/setup-python              v4
./.github/workflows/publish.yml:
	pypa/gh-action-pypi-publish       v1
	actions/checkout                  v2 ==> v3
	actions/setup-python              v3 ==> v4
```

# Supported use cases

```text
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
  --compare-exact-versions  Compare versions using all semantic and not only
                            major versions, e.g., v1 will be upgraded to
                            v1.2.3
  --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:

```text
Usage: github-actions-cli update-actions [OPTIONS]

  Show actions required updates in repository workflows

Options:
  -u, --update      Update actions in workflows (For remote repos: make
                    changes and commit, for local repos: update files)
  -commit-msg TEXT  Commit msg, only relevant when remote repo  [default:
                    chore(ci):update actions]
  --help            Show this message and exit.
```

If you want the check to compare exact versions and not only major versions, use the `--compare-exact-versions` flag.

## `list-workflows` List all workflow paths and names in a specified repository.

Example:

```shell
github-actions-cli --repo cunla/fakeredis list-workflows
```

will return:

```text
.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:

```shell
github-actions-cli --repo cunla/fakeredis list-actions .github/workflows/test.yml
```

Result

```text
actions/checkout@v3
./.github/actions/test-coverage
release-drafter/release-drafter@v5
actions/setup-python@v4
```

# Installation

```shell
pip install github-actions-cli
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dsoftwareinc/github-actions-cli",
    "name": "github-actions-cli",
    "maintainer": "Daniel Moran",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": "daniel@moransoftware.ca",
    "keywords": "GitHub Actions, CLI",
    "author": "Daniel Moran",
    "author_email": "daniel@moransoftware.ca",
    "download_url": "https://files.pythonhosted.org/packages/25/d4/85c732e155f1ee107b270b6ffc381cd31bba0a0ff7719020414921e181d5/github_actions_cli-1.1.6.tar.gz",
    "platform": null,
    "description": "GitHub Actions CLI\n====================\n\nThe purpose of this tool is to work with your GitHub Actions workflows in your repositories.\nIt is complementary to the GitHub CLI.\n\n# Basic usage\n\nRun `github-actions-cli` within a directory which has a clone of a GitHub repository.\nThe tool will list the GitHub actions workflows, the actions they use, the current versions they use, and the latest\nversions of the actions.\n\n```text\n./.github/workflows/test.yml:\n\tactions/checkout                  v2 ==> v3\n\trelease-drafter/release-drafter    v5\n\tactions/setup-python              v4\n./.github/workflows/publish.yml:\n\tpypa/gh-action-pypi-publish       v1\n\tactions/checkout                  v2 ==> v3\n\tactions/setup-python              v3 ==> v4\n```\n\n# Supported use cases\n\n```text\nUsage: github-actions-cli [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --repo TEXT               Repository to analyze, can be a local directory or\n                            a {OWNER}/{REPO} format  [default: .]\n  --github-token TEXT       GitHub token to use, by default will use\n                            GITHUB_TOKEN environment variable\n  --compare-exact-versions  Compare versions using all semantic and not only\n                            major versions, e.g., v1 will be upgraded to\n                            v1.2.3\n  --help                    Show this message and exit.\n\nCommands:\n  list-actions    List actions in a workflow\n  list-workflows  List workflows in repository\n  update-actions  Show actions required updates in repository workflows\n```\n\n## `update-actions` List all actions that are out of date in a repository (Default)\n\nList the latest versions of actions used in a repository workflows\nand potentially update the workflow files.\n\nFor example, running `github-actions-cli` without any parameters will look for workflows in the\ncurrent directory (`.`), check whether there are updates required for the actions in the workflows\nit finds.\n\nAnother example, running on a remote repository, `github-actions-cli -repo cunla/fakeredis update-actions -u`,\nwill look for the latest versions of the actions used in the repository cunla/fakeredis, and because of the `-u`\nflag, it will create a commit updating the workflows to the latest.\n\n> Note:\n> Having `GITHUB_TOKEN` with permissions to make commits on the repository\n> is required in order to write to repository.\n\nParameters:\n\n```text\nUsage: github-actions-cli update-actions [OPTIONS]\n\n  Show actions required updates in repository workflows\n\nOptions:\n  -u, --update      Update actions in workflows (For remote repos: make\n                    changes and commit, for local repos: update files)\n  -commit-msg TEXT  Commit msg, only relevant when remote repo  [default:\n                    chore(ci):update actions]\n  --help            Show this message and exit.\n```\n\nIf you want the check to compare exact versions and not only major versions, use the `--compare-exact-versions` flag.\n\n## `list-workflows` List all workflow paths and names in a specified repository.\n\nExample:\n\n```shell\ngithub-actions-cli --repo cunla/fakeredis list-workflows\n```\n\nwill return:\n\n```text\n.github/workflows/publish.yml\n.github/workflows/test.yml\n```\n\n## `list-actions` List all actions `uses` in a workflow\n\nGiven a repo and a workflow path, return all actions in the workflow.\n\nExample:\n\n```shell\ngithub-actions-cli --repo cunla/fakeredis list-actions .github/workflows/test.yml\n```\n\nResult\n\n```text\nactions/checkout@v3\n./.github/actions/test-coverage\nrelease-drafter/release-drafter@v5\nactions/setup-python@v4\n```\n\n# Installation\n\n```shell\npip install github-actions-cli\n```\n\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "GitHub Actions CLI - allows updating workflows, etc.",
    "version": "1.1.6",
    "project_urls": {
        "Bug Tracker": "https://github.com/dsoftwareinc/github-actions-cli/issues",
        "Documentation": "https://github.com/dsoftwareinc/github-actions-cli",
        "Funding": "https://github.com/sponsors/cunla",
        "Homepage": "https://github.com/dsoftwareinc/github-actions-cli"
    },
    "split_keywords": [
        "github actions",
        " cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2748cb598e5e9a14ac59886b4633af589804f38b64d27d68199b6ae5f5cd1260",
                "md5": "0f92e11834b9f089dae27d35421e366a",
                "sha256": "a0fde8a3de60ed0fe854c71ce926cf2e3a703c5e1da7cdc607739e8086fcf3ab"
            },
            "downloads": -1,
            "filename": "github_actions_cli-1.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0f92e11834b9f089dae27d35421e366a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 8925,
            "upload_time": "2024-12-11T21:50:02",
            "upload_time_iso_8601": "2024-12-11T21:50:02.437294Z",
            "url": "https://files.pythonhosted.org/packages/27/48/cb598e5e9a14ac59886b4633af589804f38b64d27d68199b6ae5f5cd1260/github_actions_cli-1.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25d485c732e155f1ee107b270b6ffc381cd31bba0a0ff7719020414921e181d5",
                "md5": "fe73fd9df850a626f5296940e798ecf9",
                "sha256": "268f4b91033a21f6da6c4e415a8d76fbe3fec26a35ffd8365f1b95bd5c977cd8"
            },
            "downloads": -1,
            "filename": "github_actions_cli-1.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "fe73fd9df850a626f5296940e798ecf9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 7679,
            "upload_time": "2024-12-11T21:50:03",
            "upload_time_iso_8601": "2024-12-11T21:50:03.924785Z",
            "url": "https://files.pythonhosted.org/packages/25/d4/85c732e155f1ee107b270b6ffc381cd31bba0a0ff7719020414921e181d5/github_actions_cli-1.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-11 21:50:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dsoftwareinc",
    "github_project": "github-actions-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "github-actions-cli"
}
        
Elapsed time: 0.41968s