From 72ced3ac0aa4f41f04835319a1a4ff1df4634eae Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Fri, 21 Oct 2022 12:34:03 +0900 Subject: [PATCH] Update test command --- .github/multiline-content.md | 5 +++++ .github/workflows/test-command.yml | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .github/multiline-content.md 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