From a192af8d70f2d49c49643134605c3b73d4f80fae Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Wed, 19 Apr 2023 11:10:35 +0900 Subject: [PATCH] fix: multiline comment regression (#849) * fix: multiline comment regression * fix ci step order --- .github/workflows/ci.yml | 13 ++++++++----- action.yml | 6 +++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4c4492..4eb95ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,10 +36,6 @@ jobs: - uses: actions/checkout@v3 with: ref: main - - uses: actions/download-artifact@v3 - with: - name: action.yml - path: . - name: Create change run: date +%s > report.txt @@ -58,9 +54,16 @@ jobs: [1]: https://github.com/peter-evans/create-pull-request branch: ci-test-${{ matrix.os }}-${{ github.sha }} + - uses: actions/download-artifact@v3 + with: + name: action.yml + path: . + - name: Close Pull uses: ./ with: pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} - comment: '[CI] test ${{ matrix.os }}' + comment: | + [CI] + test ${{ matrix.os }} delete-branch: true diff --git a/action.yml b/action.yml index db72b79..454994b 100644 --- a/action.yml +++ b/action.yml @@ -23,7 +23,11 @@ runs: shell: bash run: | if [ -n "${{ inputs.comment }}" ]; then - echo comment="--comment \"${{ inputs.comment }}\"" >> $GITHUB_OUTPUT + comment="--comment \"${{ inputs.comment }}\"" + delimiter="$(openssl rand -hex 8)" + echo "comment<<$delimiter" >> $GITHUB_OUTPUT + echo "$comment" >> $GITHUB_OUTPUT + echo "$delimiter" >> $GITHUB_OUTPUT fi if [ "${{ inputs.delete-branch }}" = true ]; then echo delete-branch="--delete-branch" >> $GITHUB_OUTPUT