Merge pull request #95 from mfn/mfn-bash-fixes

Use double quotes to preserve adjacent spaces correctly
This commit is contained in:
Peter Evans 2021-10-27 09:52:22 +09:00 committed by GitHub
commit 85a7ce6345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,11 +164,11 @@ The content must be [escaped to preserve newlines](https://github.community/t/se
```yml
- id: get-comment-body
run: |
body=$(cat comment-body.txt)
body="$(cat comment-body.txt)"
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
echo "::set-output name=body::$body"
- name: Create comment
uses: peter-evans/create-or-update-comment@v1