From bf57933352aa08fee0a991c143ebf7fb3419d116 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Wed, 14 Feb 2024 13:53:03 +0100 Subject: [PATCH] chore: include release notes in slackbot message --- .github/workflows/dhis2-verify-app.yml | 41 ++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dhis2-verify-app.yml b/.github/workflows/dhis2-verify-app.yml index 76626630b..2e6fd08a9 100644 --- a/.github/workflows/dhis2-verify-app.yml +++ b/.github/workflows/dhis2-verify-app.yml @@ -126,7 +126,7 @@ jobs: if: | !github.event.push.repository.fork && github.actor != 'dependabot[bot]' && - github.event_name != 'pull_request' + github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v3 with: @@ -196,8 +196,9 @@ jobs: needs: release if: | success() && - !cancelled() && - github.ref == 'refs/heads/master' + !cancelled() && + github.ref == 'refs/heads/master' && + contains(github.event.head_commit.message, 'chore(release)') steps: - name: Checkout code uses: actions/checkout@master @@ -213,13 +214,41 @@ jobs: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} payload: | { - "text": ":large_green_circle: :dashboard-app: :tada: Dashboard app release succeeded for version: ${{ steps.extract_version.outputs.version }}", + "text": "Dashboard app release ${{ steps.extract_version.outputs.version }} succeeded", "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": ":large_green_circle: :dashboard-app: Dashboard version ${{ steps.extract_version.outputs.version }} released :tada:", + "emoji": true + } + }, + { + "type": "divider" + }, { "type": "section", "text": { - "type": "mrkdwn", - "text": ":large_green_circle: :dashboard-app: :tada: Dashboard version ${{ steps.extract_version.outputs.version }} released " + "type": "mrkdwn", + "text": "*Release Notes*" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ${{ toJSON(github.event.head_commit.message) }} + } + }, + { + "type": "divider" + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Link to " } } ]