Skip to content

Commit 4e0ba61

Browse files
author
Ryan
authored
fix: clarify --reuse and --rm flags (#929)
* fix: clarify --reuse and --rm flags Signed-off-by: hackercat <me@hackerc.at> * lint(editorconfig): ignore *.md due to mixed style Signed-off-by: hackercat <me@hackerc.at>
1 parent cad4bc8 commit 4e0ba61

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎.editorconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ indent_size = 4
1212
indent_style = space
1313
indent_size = 2
1414

15-
[Dockerfile]
15+
[{Dockerfile,*.md}]
1616
indent_style = unset
1717
indent_size = unset
1818

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ It will save that information to `~/.actrc`, please refer to [Configuration](#co
191191
-p, --pull pull docker image(s) even if already present
192192
-q, --quiet disable logging of output from steps
193193
--rebuild rebuild local action docker image(s) even if already present
194-
-r, --reuse reuse action containers to maintain state
195-
--rm automatically remove containers just before exit
194+
-r, --reuse don't remove container(s) on successfully completed workflow(s) to maintain state between runs
195+
--rm automatically remove container(s)/volume(s) after a workflow(s) failure
196196
-s, --secret stringArray secret to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)
197197
--secret-file string file with list of secrets to read from (e.g. --secret-file .secrets) (default ".secrets")
198198
--use-gitignore Controls whether paths specified in .gitignore should be copied into container (default true)

‎cmd/root.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func Execute(ctx context.Context, version string) {
4242
rootCmd.Flags().StringArrayVarP(&input.secrets, "secret", "s", []string{}, "secret to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)")
4343
rootCmd.Flags().StringArrayVarP(&input.envs, "env", "", []string{}, "env to make available to actions with optional value (e.g. --env myenv=foo or --env myenv)")
4444
rootCmd.Flags().StringArrayVarP(&input.platforms, "platform", "P", []string{}, "custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04)")
45-
rootCmd.Flags().BoolVarP(&input.reuseContainers, "reuse", "r", false, "reuse action containers to maintain state")
45+
rootCmd.Flags().BoolVarP(&input.reuseContainers, "reuse", "r", false, "don't remove container(s) on successfully completed workflow(s) to maintain state between runs")
4646
rootCmd.Flags().BoolVarP(&input.bindWorkdir, "bind", "b", false, "bind working directory to container, rather than copy")
4747
rootCmd.Flags().BoolVarP(&input.forcePull, "pull", "p", false, "pull docker image(s) even if already present")
4848
rootCmd.Flags().BoolVarP(&input.forceRebuild, "rebuild", "", false, "rebuild local action docker image(s) even if already present")
@@ -54,7 +54,7 @@ func Execute(ctx context.Context, version string) {
5454
rootCmd.Flags().BoolVar(&input.useGitIgnore, "use-gitignore", true, "Controls whether paths specified in .gitignore should be copied into container")
5555
rootCmd.Flags().StringArrayVarP(&input.containerCapAdd, "container-cap-add", "", []string{}, "kernel capabilities to add to the workflow containers (e.g. --container-cap-add SYS_PTRACE)")
5656
rootCmd.Flags().StringArrayVarP(&input.containerCapDrop, "container-cap-drop", "", []string{}, "kernel capabilities to remove from the workflow containers (e.g. --container-cap-drop SYS_PTRACE)")
57-
rootCmd.Flags().BoolVar(&input.autoRemove, "rm", false, "automatically remove containers just before exit")
57+
rootCmd.Flags().BoolVar(&input.autoRemove, "rm", false, "automatically remove container(s)/volume(s) after a workflow(s) failure")
5858
rootCmd.PersistentFlags().StringVarP(&input.actor, "actor", "a", "nektos/act", "user that triggered the event")
5959
rootCmd.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow file(s)")
6060
rootCmd.PersistentFlags().BoolVarP(&input.noWorkflowRecurse, "no-recurse", "", false, "Flag to disable running workflows from subdirectories of specified path in '--workflows'/'-W' flag")

0 commit comments

Comments
 (0)