github-actions-cli


Namegithub-actions-cli JSON
Version 1.1.5 PyPI version JSON
download
home_pagehttps://github.com/dsoftwareinc/github-actions-cli
SummaryGitHub Actions CLI - allows updating workflows, etc.
upload_time2024-04-05 10:29:12
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/d1/fc/9d4e7aeaf6ca087f0a313abaff411f5beaa589ebd7dbf6bddd9a7c90c5ab/github_actions_cli-1.1.5.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.5",
    "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": "d1fc9d4e7aeaf6ca087f0a313abaff411f5beaa589ebd7dbf6bddd9a7c90c5ab",
                "md5": "a8f2cf4d65ce6cd7617881714d116022",
                "sha256": "d43ed4ebcdc1150633abb8760001f04d46acf6fce5de285f645035b8dbb71f80"
            },
            "downloads": -1,
            "filename": "github_actions_cli-1.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "a8f2cf4d65ce6cd7617881714d116022",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 7668,
            "upload_time": "2024-04-05T10:29:12",
            "upload_time_iso_8601": "2024-04-05T10:29:12.080372Z",
            "url": "https://files.pythonhosted.org/packages/d1/fc/9d4e7aeaf6ca087f0a313abaff411f5beaa589ebd7dbf6bddd9a7c90c5ab/github_actions_cli-1.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-05 10:29:12",
    "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.76989s