From 92e8a8da72decd8b0463b86a38f041482a7bfc3e Mon Sep 17 00:00:00 2001 From: Andrei Radulescu Date: Sat, 20 Jul 2024 16:53:43 +0300 Subject: [PATCH] multiline support in LAST_COMMIT_MESSAGE --- .github/workflows/build.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c64d4bcd..f5953019 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,14 +25,18 @@ jobs: - name: Get commit message run: | - if [ "${{ github.event_name }}" == "push" ]; then - echo "LAST_COMMIT_MESSAGE='${{ github.event.head_commit.message }}'" | tee -a $GITHUB_ENV - elif [ "${{ github.event_name }}" == "workflow_run" ]; then - echo "LAST_COMMIT_MESSAGE='${{ github.event.workflow_run.head_commit.message }}'" | tee -a $GITHUB_ENV - elif [ "${{ github.event_name }}" == "pull_request" ]; then - echo "LAST_COMMIT_MESSAGE=$(curl -s '${{ github.event.pull_request.commits_url }}' | jq -r '.[-1].commit.message')" | tee -a $GITHUB_ENV - fi - + { + echo 'LAST_COMMIT_MESSAGE<