From bc1737101793f711ee3f4af48304a071603dad7f Mon Sep 17 00:00:00 2001 From: Zack Wang Date: Tue, 18 Oct 2022 18:27:28 -0400 Subject: [PATCH] Fixes #1387 (#1388) --- pkg/container/docker_run.go | 2 +- pkg/runner/testdata/env-and-path/push.yaml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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