markdown-extract icon indicating copy to clipboard operation
markdown-extract copied to clipboard

Action sample workflow breaks if markdown contains an apostrophe

Open jayqi opened this issue 10 months ago • 1 comments

This step in the sample workflow:

- name: Write output to file
  run: |
    printf '${{ steps.extract-changelog.outputs.markdown }}' > CHANGELOG-extracted.txt

will break if there is an apostrophe in the extracted markdown content.

Here's an example:

https://github.com/jayqi/gha-python-package-release-demo/actions/runs/13342379809/job/37268650798

Image

with this markdown document.


I was able to do it correctly by using heredoc to dump the content into a file instead.

https://github.com/jayqi/gha-python-package-release-demo/blob/69c2db55b56a2a4eee1bf82467b87f47897c7bc9/.github/workflows/release.yml#L53-L57

jayqi avatar Feb 15 '25 06:02 jayqi

Thanks for your example jayqi, it helped me!

uzoltan avatar Mar 01 '25 15:03 uzoltan