From b5da9ca48128073b38d4e19251b76a9c96a862a0 Mon Sep 17 00:00:00 2001 From: Kamil Samigullin Date: Tue, 18 Apr 2023 10:43:47 +0300 Subject: [PATCH] fix #716: ci/cd: notify action has a problem --- .github/actions/notify/action.yml | 22 ++++++++++++++++------ .github/workflows/docs.yml | 4 ++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/actions/notify/action.yml b/.github/actions/notify/action.yml index 95e55a70..119f7b6f 100644 --- a/.github/actions/notify/action.yml +++ b/.github/actions/notify/action.yml @@ -13,14 +13,24 @@ runs: - name: Define notification message id: message run: | - if [ "${{ github.event.head_commit.message != null }}" == 'true' ] + if [ '${{ github.event.head_commit.message != null }}' == 'true' ] then - echo txt="${{ github.event.head_commit.message }}" | head -1 >> $GITHUB_OUTPUT - elif [ "${{ github.event.schedule != null }}" == 'true' ] + (cat <<-message + txt=${{ github.event.head_commit.message }} + message + ) | head -1 >> $GITHUB_OUTPUT + + elif [ '${{ github.event.inputs.reason != null }}' == 'true' ] then - echo txt="regular healthcheck" >> $GITHUB_OUTPUT - elif [ "${{ github.event.inputs.reason != null }}" == 'true' ] + (cat <<-message + txt=${{ github.event.inputs.reason }} + message + ) | head -1 >> $GITHUB_OUTPUT + + elif [ '${{ github.event.schedule != null }}' == 'true' ] then - echo txt="${{ github.event.inputs.reason }}" >> $GITHUB_OUTPUT + echo txt='regular healthcheck' >> $GITHUB_OUTPUT + else + echo Cannot define notification message && exit 1 fi shell: bash diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0ddadd0f..3a6bfbbb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,8 +12,8 @@ on: branches: [ main ] paths: - '.github/workflows/docs.yml' - - 'docs/*' - - 'tools/pages/*' + - 'docs/**/*' + - 'tools/pages/**/*' - 'tools/*.jsx?' - 'tools/package*.json' tags: [ '!*' ]