Skip to content

Conversation

tbobm
Copy link

@tbobm tbobm commented May 7, 2025

Thanks a lot for this wonderful tool πŸ™‡β€β™‚οΈ

Currently descriptions are a mixin of Capitalized and lowercased with different phrasing styles.

This PR aims to normalize this and set a baseline for future additions by standardizing
every description to match UNIX conventions (lowercase + imperative tone).

~ act --help
Run GitHub actions locally by specifying the event name (e.g. `push`) or an action name directly.

Usage:
  act [event name to run] [flags]

If no event name passed, will default to "on: push"
If actions handles only one event it will be used as default instead of "on: push"

Flags:
      --action-cache-path string                          Defines the path where the actions get cached and host workspaces created. (default "/home/bob/.cache/act")
      --action-offline-mode                               If action contents exists, it will not be fetch and pull again. If turn on this, will turn off force pull
  -a, --actor string                                      user that triggered the event (default "nektos/act")
      --artifact-server-addr string                       Defines the address to which the artifact server binds. (default "172.16.47.105")
      --artifact-server-path string                       Defines the path where the artifact server stores uploads and retrieves downloads from. If not specified the artifact server will not start.
      --artifact-server-port string                       Defines the port where the artifact server listens. (default "34567")
  -b, --bind                                              bind working directory to container, rather than copy
      --bug-report                                        Display system information for bug report
      --cache-server-addr string                          Defines the address to which the cache server binds. (default "172.16.47.105")
      --cache-server-path string                          Defines the path where the cache server stores caches. (default "/home/bob/.cache/actcache")
      --cache-server-port uint16                          Defines the port where the artifact server listens. 0 means a randomly available port.
      --container-architecture string                     Architecture which should be used to run containers, e.g.: linux/amd64. If not specified, will use host default architecture. Requires Docker server API Version 1.41+. Ignored on earlier Docker server platforms.
      --container-cap-add stringArray                     kernel capabilities to add to the workflow containers (e.g. --container-cap-add SYS_PTRACE)
      --container-cap-drop stringArray                    kernel capabilities to remove from the workflow containers (e.g. --container-cap-drop SYS_PTRACE)
      --container-daemon-socket string                    URI to Docker Engine socket (e.g.: unix://~/.docker/run/docker.sock or - to disable bind mounting the socket)
      --container-options string                          Custom docker container options for the job container without an options property in the job definition
      --defaultbranch string                              the name of the main branch
      --detect-event                                      Use first event type from workflow as event that triggered the workflow
  -C, --directory string                                  working directory (default ".")
  -n, --dryrun                                            disable container creation, validates only workflow correctness
      --env stringArray                                   env to make available to actions with optional value (e.g. --env myenv=foo or --env myenv)
      --env-file string                                   environment file to read and use as env in the containers (default ".env")
  -e, --eventpath string                                  path to event JSON file
      --github-instance string                            GitHub instance to use. Only use this when using GitHub Enterprise Server. (default "github.com")
  -g, --graph                                             draw workflows
  -h, --help                                              help for act
      --input stringArray                                 action input to make available to actions (e.g. --input myinput=foo)
      --input-file string                                 input file to read and use as action input (default ".input")
      --insecure-secrets                                  NOT RECOMMENDED! Doesn't hide secrets while printing logs.
  -j, --job string                                        run a specific job ID
      --json                                              Output logs in json format
  -l, --list                                              list workflows
      --list-options                                      Print a json structure of compatible options
      --local-repository stringArray                      Replaces the specified repository and ref with a local folder (e.g. https://github.com/test/test@v0=/home/act/test or test/test@v0=/home/act/test, the latter matches any hosts or protocols)
      --log-prefix-job-id                                 Output the job id within non-json logs instead of the entire name
      --man-page                                          Print a generated manual page to stdout
      --matrix stringArray                                specify which matrix configuration to include (e.g. --matrix java:13
      --network string                                    Sets a docker network name. Defaults to host. (default "host")
      --no-cache-server                                   Disable cache server
      --no-recurse                                        Flag to disable running workflows from subdirectories of specified path in '--workflows'/'-W' flag
      --no-skip-checkout                                  Use actions/checkout instead of copying local files into container
  -P, --platform stringArray                              custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04)
      --privileged                                        use privileged mode
  -p, --pull                                              pull docker image(s) even if already present (default true)
  -q, --quiet                                             disable logging of output from steps
      --rebuild                                           rebuild local action docker image(s) even if already present (default true)
      --remote-name string                                git remote name that will be used to retrieve url of git repo (default "origin")
      --replace-ghe-action-token-with-github-com string   If you are using replace-ghe-action-with-github-com  and you want to use private actions on GitHub, you have to set personal access token
      --replace-ghe-action-with-github-com stringArray    If you are using GitHub Enterprise Server and allow specified actions from GitHub (github.com), you can set actions on this. (e.g. --replace-ghe-action-with-github-com =github/super-linter)
  -r, --reuse                                             don't remove container(s) on successfully completed workflow(s) to maintain state between runs
      --rm                                                automatically remove container(s)/volume(s) after a workflow(s) failure
  -s, --secret stringArray                                secret to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)
      --secret-file string                                file with list of secrets to read from (e.g. --secret-file .secrets) (default ".secrets")
      --use-gitignore                                     Controls whether paths specified in .gitignore should be copied into container (default true)
      --use-new-action-cache                              Enable using the new Action Cache for storing Actions locally
      --userns string                                     user namespace to use
      --var stringArray                                   variable to make available to actions with optional value (e.g. --var myvar=foo or --var myvar)
      --var-file string                                   file with list of vars to read from (e.g. --var-file .vars) (default ".vars")
  -v, --verbose                                           verbose output
      --version                                           version for act
  -w, --watch                                             watch the contents of the local repo and run when files change
  -W, --workflows string                                  path to workflow file(s) (default "./.github/workflows/")

This helper becomes the following:

~ go run main.go --help
Run GitHub actions locally by specifying the event name (e.g. `push`) or an action name directly.

Usage:
  act [event name to run] [flags]

If no event name passed, will default to "on: push"
If actions handles only one event it will be used as default instead of "on: push"

Flags:
      --action-cache-path string                          define the path where the actions get cached and host workspaces created (default "/home/bob/.cache/act")
      --action-offline-mode                               prioritize using locally downloaded action contents when it exists and disable force pull
  -a, --actor string                                      define which user triggered the event (default "nektos/act")
      --artifact-server-addr string                       define the address to which the artifact server binds to (default "172.16.47.105")
      --artifact-server-path string                       define the path where the artifact server stores uploads and retrieves downloads from, required to start the artifact server
      --artifact-server-port string                       define the port where the artifact server listens (default "34567")
  -b, --bind                                              bind working directory to container, rather than copy
      --bug-report                                        display system information for bug report
      --cache-server-addr string                          define the address to which the cache server binds to (default "172.16.47.105")
      --cache-server-external-url string                  set the external URL the cache server if it is behind a proxy (e.g.: https://act-cache-server.example.com, make sure there is no trailing slash)
      --cache-server-path string                          define the path where the cache server stores caches. (default "/home/bob/.cache/actcache")
      --cache-server-port uint16                          define the port where the artifact server listens, 0 will use a randomly available port
      --container-architecture string                     set which architecture should be used to run containers, e.g.: linux/amd64. If not specified, use host default architecture. Requires Docker server API Version 1.41+. Ignored on earlier Docker server platforms.
      --container-cap-add stringArray                     grant kernel capabilities to add to the workflow containers (e.g. --container-cap-add SYS_PTRACE)
      --container-cap-drop stringArray                    grant kernel capabilities to remove from the workflow containers (e.g. --container-cap-drop SYS_PTRACE)
      --container-daemon-socket string                    set the URI to Docker Engine socket (e.g.: unix://~/.docker/run/docker.sock or - to disable bind mounting the socket)
      --container-options string                          add custom docker container options for the job container without an options property in the job definition
      --defaultbranch string                              the name of the main branch
      --detect-event                                      use first event type from workflow as event that triggered the workflow
  -C, --directory string                                  override the working directory (default ".")
  -n, --dryrun                                            disable container creation, only validate workflow correctness
      --env stringArray                                   set env variable(s) to make available to actions with optional value (e.g. --env myenv=foo or --env myenv)
      --env-file string                                   set environment file to read and use as env in the containers (default ".env")
  -e, --eventpath string                                  set the path to event JSON file that will be used as an input for the workflow
      --github-instance string                            set which GitHub instance to use, only use this when using GitHub Enterprise Server (default "github.com")
  -g, --graph                                             draw workflows
  -h, --help                                              help for act
      --input stringArray                                 set action input to make available to actions (e.g. --input myinput=foo)
      --input-file string                                 set input file to read and use as action input (default ".input")
      --insecure-secrets                                  NOT RECOMMENDED: display secrets in logs
  -j, --job string                                        run a specific job ID
      --json                                              switch log format to json
  -l, --list                                              list workflows
      --list-options                                      print a json structure of compatible options
      --local-repository stringArray                      replace the specified repository and ref with a local folder (e.g. https://github.com/test/test@v0=/home/act/test or test/test@v0=/home/act/test, the latter matches any hosts or protocols)
      --log-prefix-job-id                                 output the job id within non-json logs instead of the entire name
      --man-page                                          print a generated manual page to stdout
      --matrix stringArray                                specify which matrix configuration to include (e.g. --matrix java:13
      --network string                                    set a docker network name, defaults to "host" (default "host")
      --no-cache-server                                   disable the cache server
      --no-recurse                                        prevent running workflows from subdirectories of specified path in '--workflows'/'-W' flag
      --no-skip-checkout                                  use actions/checkout instead of copying local files into container
  -P, --platform stringArray                              custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04)
      --privileged                                        use privileged mode
  -p, --pull                                              pull docker image(s) even if already present (default true)
  -q, --quiet                                             disable logging of output from steps
      --rebuild                                           rebuild local action docker image(s) even if already present (default true)
      --remote-name string                                set the git remote name that will be used to retrieve url of git repo (default "origin")
      --replace-ghe-action-token-with-github-com string   if you are using replace-ghe-action-with-github-com and you want to use private actions on GitHub, you have to set personal access token
      --replace-ghe-action-with-github-com stringArray    if you are using GitHub Enterprise Server and allow specified actions from GitHub (github.com), you can set actions on this (e.g. --replace-ghe-action-with-github-com =github/super-linter)
  -r, --reuse                                             keep container(s) on successfully completed workflow(s) to maintain state between runs
      --rm                                                automatically remove container(s)/volume(s) after a workflow(s) failure
  -s, --secret stringArray                                set secret(s) to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)
      --secret-file string                                set a file with list of secrets to read from (e.g. --secret-file .secrets) (default ".secrets")
      --use-gitignore                                     control whether paths specified in .gitignore should be copied into container (default true)
      --use-new-action-cache                              enable using the new Action Cache for storing Actions locally
      --userns string                                     user namespace to use
      --var stringArray                                   set variable(s) to make available to actions with optional value (e.g. --var myvar=foo or --var myvar)
      --var-file string                                   set a file with list of vars to read from (e.g. --var-file .vars) (default ".vars")
  -v, --verbose                                           set output to verbose
      --version                                           version for act
  -w, --watch                                             watch the contents of the local repo and run when files change
  -W, --workflows string                                  set path to workflow file(s) directory (default "./.github/workflows/")

Use imperative tone, lowercase as mush as possible and standardize text

Signed-off-by: Theo Bob Massard <tbobm@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant