Skip to content

Commit

Permalink
Actually escape the release summary better
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz committed Sep 13, 2024
1 parent 6e7603c commit 457df8a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
version: ${{ matrix.esphome-version }}
platform: linux/amd64
cache: true
release-summary: 'Test "release" summary'
release-summary: 'Test "release" summary\r\n* Multiple lines'
release-url: "https://github.com/esphome/build-action"
complete-manifest: ${{ matrix.manifest == 'complete' }}
- name: Write version to file
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ runs:
shell: bash
id: build-step
run: |-
read -r -d '' summary <<'ENDOFSUMMARY'
${{ inputs.release-summary }}
ENDOFSUMMARY
docker run --rm \
--platform ${{ inputs.platform }} \
--workdir /github/workspace \
Expand All @@ -105,7 +109,7 @@ runs:
-e HOME \
esphome:${{ inputs.version }} \
${{ inputs.yaml-file }} \
--release-summary ${{ toJSON(inputs.release-summary) }} \
--release-summary "$summary" \
--release-url "${{ inputs.release-url }}" \
--outputs-file "$GITHUB_OUTPUT" \
${{ inputs.complete-manifest == 'true' && '--complete-manifest' || '--partial-manifest' }}
Expand Down
2 changes: 1 addition & 1 deletion tests/complete-manifest-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ota": {
"path": "test-esp32.ota.bin",
"md5": "\($md5)",
"summary": "Test \"release\" summary",
"summary": "Test \"release\" summary\r\n* Multiple lines",
"release_url": "https://github.com/esphome/build-action"
},
"parts": [
Expand Down
2 changes: 1 addition & 1 deletion tests/partial-manifest-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"ota": {
"path": "test-esp32.ota.bin",
"md5": "\($md5)",
"summary": "Test \"release\" summary",
"summary": "Test \"release\" summary\r\n* Multiple lines",
"release_url": "https://github.com/esphome/build-action"
},
"parts": [
Expand Down

0 comments on commit 457df8a

Please sign in to comment.