mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
Add option to allow files/directories in .gitignore
to be copied to container (#537)
* disable gitignore for actions * feat: Add option to allow/disallow paths specified in .gitignore Co-authored-by: Alan Birtles <alan.birtles@eu.sony.com>
This commit is contained in:
parent
442a8a95ae
commit
cf202bedb5
6 changed files with 19 additions and 12 deletions
|
@ -49,6 +49,7 @@ func Execute(ctx context.Context, version string) {
|
|||
rootCmd.Flags().StringVar(&input.defaultBranch, "defaultbranch", "", "the name of the main branch")
|
||||
rootCmd.Flags().BoolVar(&input.privileged, "privileged", false, "use privileged mode")
|
||||
rootCmd.Flags().StringVar(&input.usernsMode, "userns", "", "user namespace to use")
|
||||
rootCmd.Flags().BoolVar(&input.useGitIgnore, "use-gitignore", true, "Controls whether paths specified in .gitignore should be copied into container")
|
||||
rootCmd.PersistentFlags().StringVarP(&input.actor, "actor", "a", "nektos/act", "user that triggered the event")
|
||||
rootCmd.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow file(s)")
|
||||
rootCmd.PersistentFlags().StringVarP(&input.workdir, "directory", "C", ".", "working directory")
|
||||
|
@ -252,6 +253,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
|
|||
Privileged: input.privileged,
|
||||
UsernsMode: input.usernsMode,
|
||||
ContainerArchitecture: input.containerArchitecture,
|
||||
UseGitIgnore: input.useGitIgnore,
|
||||
}
|
||||
r, err := runner.New(config)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue