Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zukwung authored Oct 18, 2022
1 parent 37f5b7f commit bc17371
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/container/docker_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions pkg/runner/testdata/env-and-path/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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<<ghadelimiter_b8273c6d-d535-419a-a010-b0aaac240e36' >> $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

0 comments on commit bc17371

Please sign in to comment.