diff --git a/pkg/container/docker_run.go b/pkg/container/docker_run.go index b935166c..f58287e3 100644 --- a/pkg/container/docker_run.go +++ b/pkg/container/docker_run.go @@ -505,7 +505,7 @@ func (cr *containerReference) extractEnv(srcPath string, env *map[string]string) // SOME_VAR=data=moredata // SOME_VAR=datamoredata singleLineEnvPattern = regexp.MustCompile(`^([^=]*)\=(.*)$`) - multiLineEnvPattern = regexp.MustCompile(`^([^<]+)<<(\w+)$`) + multiLineEnvPattern = regexp.MustCompile(`^([^<]+)<<([\w-]+)$`) } localEnv := *env diff --git a/pkg/runner/testdata/env-and-path/push.yaml b/pkg/runner/testdata/env-and-path/push.yaml index 8773afc7..11c7ae3a 100644 --- a/pkg/runner/testdata/env-and-path/push.yaml +++ b/pkg/runner/testdata/env-and-path/push.yaml @@ -66,3 +66,14 @@ jobs: echo "${KEY2} doesn't == 'value'" exit 1 fi + - name: "Write multiline env with UUID to $GITHUB_ENV" + run: | + echo 'KEY3<> $GITHUB_ENV + echo value3 >> $GITHUB_ENV + echo 'ghadelimiter_b8273c6d-d535-419a-a010-b0aaac240e36' >> $GITHUB_ENV + - name: "Check multiline env with UUID to $GITHUB_ENV" + run: | + if [[ "${KEY3}" != "value3" ]]; then + echo "${KEY3} doesn't == 'value3'" + exit 1 + fi