summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/input.go1
-rw-r--r--cmd/root.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/cmd/input.go b/cmd/input.go
index 64556e1..1ae2793 100644
--- a/cmd/input.go
+++ b/cmd/input.go
@@ -55,6 +55,7 @@ type Input struct {
replaceGheActionTokenWithGithubCom string
matrix []string
actionCachePath string
+ logPrefixJobID bool
}
func (i *Input) resolve(path string) string {
diff --git a/cmd/root.go b/cmd/root.go
index f7b6515..679d20e 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -75,6 +75,7 @@ func Execute(ctx context.Context, version string) {
rootCmd.PersistentFlags().StringVarP(&input.workdir, "directory", "C", ".", "working directory")
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "verbose output")
rootCmd.PersistentFlags().BoolVar(&input.jsonLogger, "json", false, "Output logs in json format")
+ rootCmd.PersistentFlags().BoolVar(&input.logPrefixJobID, "log-prefix-job-id", false, "Output the job id within non-json logs instead of the entire name")
rootCmd.PersistentFlags().BoolVarP(&input.noOutput, "quiet", "q", false, "disable logging of output from steps")
rootCmd.PersistentFlags().BoolVarP(&input.dryrun, "dryrun", "n", false, "dryrun mode")
rootCmd.PersistentFlags().StringVarP(&input.secretfile, "secret-file", "", ".secrets", "file with list of secrets to read from (e.g. --secret-file .secrets)")
@@ -584,6 +585,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
BindWorkdir: input.bindWorkdir,
LogOutput: !input.noOutput,
JSONLogger: input.jsonLogger,
+ LogPrefixJobID: input.logPrefixJobID,
Env: envs,
Secrets: secrets,
Vars: vars,