diff --git a/.github/multiline-content.md b/.github/multiline-content.md new file mode 100644 index 0000000..465112f --- /dev/null +++ b/.github/multiline-content.md @@ -0,0 +1,5 @@ +This is a multi-line test comment read from a file. +- With GitHub **Markdown** :sparkles: +- Created by [create-or-update-comment][1] + +[1]: https://github.com/peter-evans/create-or-update-comment diff --git a/.github/workflows/test-command.yml b/.github/workflows/test-command.yml index aff65fd..77a32ca 100644 --- a/.github/workflows/test-command.yml +++ b/.github/workflows/test-command.yml @@ -60,6 +60,22 @@ jobs: comment-id: ${{ github.event.client_payload.github.payload.comment.id }} reactions: hooray + # Test create with body from file + - id: get-comment-body + run: | + body="$(cat .github/multiline-content.md)" + delimiter="$(openssl rand -hex 8)" + echo "body<<$delimiter" >> $GITHUB_OUTPUT + echo $body >> $GITHUB_OUTPUT + echo $delimiter >> $GITHUB_OUTPUT + + - name: Create comment + uses: ./ + with: + issue-number: 1 + body: ${{ steps.get-comment-body.outputs.body }} + + # Test create from template - name: Render template id: template uses: chuhlomin/render-template@v1.5