Setting sep-tags to ' ' does not take effect, tag separator remains a newline
Behaviour
When setting with: sep-tags: ' ' (a string containing a single space character), the separator is ignored, and the action continues to separate the tags with a newline instead.
Setting sep-tags to some other string, such as xxx, works as expected.
My theory is that the call to
core.getInputon this line is returning a falsy value when it retrieves a string that contains only whitespace.
Given that setting this value to ' ' is probably the most plausible use case for sep-tags, I would expect this to work correctly. For now my workaround will have to be to use sed to convert the newlines to spaces for the rest of my scripting to consume.
Steps to reproduce this issue
- Set
sep-tagsto' '
Expected behaviour
The tags in the output should be separated by a single space.
Actual behaviour
The tags are separated by a newline, as if we did not set sep-tags.
Configuration
- name: Docker metadata
id: docker-metadata
uses: docker/metadata-action@v4
with:
images: <redacted>
sep-tags: ' '
tags: |
type=sha,prefix=,format=long
type=schedule
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
Logs
/home/runner/work/_temp/799388a1-9005-4fc6-b15d-98325a4d5ee6.sh: line 3: syntax error near unexpected token `<redacted>:ee0b30872d08ca855a7016346493cee176f3bdac'
<redacted>:ee0b30872d08ca855a7016346493cee176f3bdac