Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quotes in list inputs cause "Invalid Opening Quote" #152

Closed
actualben opened this issue Nov 29, 2021 · 2 comments · Fixed by #153
Closed

quotes in list inputs cause "Invalid Opening Quote" #152

actualben opened this issue Nov 29, 2021 · 2 comments · Fixed by #153

Comments

@actualben
Copy link

actualben commented Nov 29, 2021

Behaviour

When a list item value contains quotes, like the following label:

      - name: Extract Docker metadata
        id: meta
        uses: docker/metadata-action@v3
        with:
          images: example
          labels: |
            org.opencontainers.image.description=this is a "good" example

The error: Error: Invalid Opening Quote: a quote is found inside a field at line 1 is produced. Previously this was touched on in #87 and as a result there was a change to build-push-action's input parsing. That didn't cover the case where the quote-containing value is an input to this action.

Does it make sense to add relax: true, to the input parsing in this action as well? If not, it probably makes sense to document the proper way to escape quotes somewhere in the metadata-action docs.

Steps to reproduce this issue

  1. have a label or other list input item which contains quotation marks
  2. run action

Expected behaviour

I'd expect there to be a documented way to have a label containing quotes.

Actual behaviour

Error: Invalid Opening Quote: a quote is found inside a field at line 1

Configuration

see yaml snippet in Behaviour section above

@crazy-max
Copy link
Member

@actualben #153. Can you try with crazy-max/docker-metadata-action@preserve-quotes?

@actualben
Copy link
Author

That fixed it! Thank you.

Before: https://github.com/backplane/conex/runs/4351586888?check_suite_focus=true
After: https://github.com/backplane/conex/runs/4353505568?check_suite_focus=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants