You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add option to bypass GHE for actions checkout (#1162)
* feat(#1161): add --through-action to assigned actions from GitHub
* docs(flags): add --through-action and --through-action-token flags description
* test(action, remote): add test case for ThroughAction
* refactor(command): rename command from --through-action to --actions-from-github
* refactor(command): rename command from --actions-from-github to --replace-ghe-action-with-github.lhy31512.workers.dev
Copy file name to clipboardexpand all lines: README.md
+38-36
Original file line number
Diff line number
Diff line change
@@ -159,42 +159,44 @@ It will save that information to `~/.actrc`, please refer to [Configuration](#co
159
159
# Flags
160
160
161
161
```none
162
-
-a, --actor string user that triggered the event (default "nektos/act")
163
-
--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.
164
-
--artifact-server-port string Defines the port where the artifact server listens (will only bind to localhost). (default "34567")
165
-
-b, --bind bind working directory to container, rather than copy
166
-
--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.
167
-
--container-cap-add stringArray kernel capabilities to add to the workflow containers (e.g. --container-cap-add SYS_PTRACE)
168
-
--container-cap-drop stringArray kernel capabilities to remove from the workflow containers (e.g. --container-cap-drop SYS_PTRACE)
169
-
--container-daemon-socket string Path to Docker daemon socket which will be mounted to containers (default "/var/run/docker.sock")
170
-
--defaultbranch string the name of the main branch
171
-
--detect-event Use first event type from workflow as event that triggered the workflow
172
-
-C, --directory string working directory (default ".")
173
-
-n, --dryrun dryrun mode
174
-
--env stringArray env to make available to actions with optional value (e.g. --env myenv=foo or --env myenv)
175
-
--env-file string environment file to read and use as env in the containers (default ".env")
176
-
-e, --eventpath string path to event JSON file
177
-
--github-instance string GitHub instance to use. Don't use this if you are not using GitHub Enterprise Server. (default "github.com")
178
-
-g, --graph draw workflows
179
-
-h, --help help for act
180
-
--insecure-secrets NOT RECOMMENDED! Doesn't hide secrets while printing logs.
181
-
-j, --job string run job
182
-
-l, --list list workflows
183
-
--no-recurse Flag to disable running workflows from subdirectories of specified path in '--workflows'/'-W' flag
184
-
-P, --platform stringArray custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04)
185
-
--privileged use privileged mode
186
-
-p, --pull pull docker image(s) even if already present
187
-
-q, --quiet disable logging of output from steps
188
-
--rebuild rebuild local action docker image(s) even if already present
189
-
-r, --reuse don't remove container(s) on successfully completed workflow(s) to maintain state between runs
190
-
--rm automatically remove container(s)/volume(s) after a workflow(s) failure
191
-
-s, --secret stringArray secret to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)
192
-
--secret-file string file with list of secrets to read from (e.g. --secret-file .secrets) (default ".secrets")
193
-
--use-gitignore Controls whether paths specified in .gitignore should be copied into container (default true)
194
-
--userns string user namespace to use
195
-
-v, --verbose verbose output
196
-
-w, --watch watch the contents of the local repo and run when files change
197
-
-W, --workflows string path to workflow file(s) (default "./.github/workflows/")
162
+
-a, --actor string user that triggered the event (default "nektos/act")
163
+
--replace-ghe-action-with-github.lhy31512.workers.dev 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.lhy31512.workers.dev=github/super-linter)
164
+
--replace-ghe-action-token-with-github.lhy31512.workers.dev If you are using replace-ghe-action-with-github.lhy31512.workers.dev and you want to use private actions on GitHub, you have to set personal access token
165
+
--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.
166
+
--artifact-server-port string Defines the port where the artifact server listens (will only bind to localhost). (default "34567")
167
+
-b, --bind bind working directory to container, rather than copy
168
+
--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.
169
+
--container-cap-add stringArray kernel capabilities to add to the workflow containers (e.g. --container-cap-add SYS_PTRACE)
170
+
--container-cap-drop stringArray kernel capabilities to remove from the workflow containers (e.g. --container-cap-drop SYS_PTRACE)
171
+
--container-daemon-socket string Path to Docker daemon socket which will be mounted to containers (default "/var/run/docker.sock")
172
+
--defaultbranch string the name of the main branch
173
+
--detect-event Use first event type from workflow as event that triggered the workflow
174
+
-C, --directory string working directory (default ".")
175
+
-n, --dryrun dryrun mode
176
+
--env stringArray env to make available to actions with optional value (e.g. --env myenv=foo or --env myenv)
177
+
--env-file string environment file to read and use as env in the containers (default ".env")
178
+
-e, --eventpath string path to event JSON file
179
+
--github-instance string GitHub instance to use. Don't use this if you are not using GitHub Enterprise Server. (default "github.com")
180
+
-g, --graph draw workflows
181
+
-h, --help help for act
182
+
--insecure-secrets NOT RECOMMENDED! Doesn't hide secrets while printing logs.
183
+
-j, --job string run job
184
+
-l, --list list workflows
185
+
--no-recurse Flag to disable running workflows from subdirectories of specified path in '--workflows'/'-W' flag
186
+
-P, --platform stringArray custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04)
187
+
--privileged use privileged mode
188
+
-p, --pull pull docker image(s) even if already present
189
+
-q, --quiet disable logging of output from steps
190
+
--rebuild rebuild local action docker image(s) even if already present
191
+
-r, --reuse don't remove container(s) on successfully completed workflow(s) to maintain state between runs
192
+
--rm automatically remove container(s)/volume(s) after a workflow(s) failure
193
+
-s, --secret stringArray secret to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)
194
+
--secret-file string file with list of secrets to read from (e.g. --secret-file .secrets) (default ".secrets")
195
+
--use-gitignore Controls whether paths specified in .gitignore should be copied into container (default true)
196
+
--userns string user namespace to use
197
+
-v, --verbose verbose output
198
+
-w, --watch watch the contents of the local repo and run when files change
199
+
-W, --workflows string path to workflow file(s) (default "./.github/workflows/")
Copy file name to clipboardexpand all lines: cmd/root.go
+33-29
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,8 @@ func Execute(ctx context.Context, version string) {
61
61
rootCmd.Flags().StringArrayVarP(&input.containerCapAdd, "container-cap-add", "", []string{}, "kernel capabilities to add to the workflow containers (e.g. --container-cap-add SYS_PTRACE)")
62
62
rootCmd.Flags().StringArrayVarP(&input.containerCapDrop, "container-cap-drop", "", []string{}, "kernel capabilities to remove from the workflow containers (e.g. --container-cap-drop SYS_PTRACE)")
63
63
rootCmd.Flags().BoolVar(&input.autoRemove, "rm", false, "automatically remove container(s)/volume(s) after a workflow(s) failure")
64
+
rootCmd.Flags().StringArrayVarP(&input.replaceGheActionWithGithubCom, "replace-ghe-action-with-github.lhy31512.workers.dev", "", []string{}, "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.lhy31512.workers.dev =github/super-linter)")
65
+
rootCmd.Flags().StringVar(&input.replaceGheActionTokenWithGithubCom, "replace-ghe-action-token-with-github.lhy31512.workers.dev", "", "If you are using replace-ghe-action-with-github.lhy31512.workers.dev and you want to use private actions on GitHub, you have to set personal access token")
64
66
rootCmd.PersistentFlags().StringVarP(&input.actor, "actor", "a", "nektos/act", "user that triggered the event")
65
67
rootCmd.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow file(s)")
66
68
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