From 51f0760fbbeb556625f15c841ac6eb493248fab5 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Wed, 27 Sep 2023 16:26:52 +0200 Subject: [PATCH] chore: only send bot messages on the actual release commit (#2988) Only messages on the actual release should be sent to the slack channel This can be identified by the chore(release) in the commit message. --- .github/workflows/dhis2-verify-app.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dhis2-verify-app.yml b/.github/workflows/dhis2-verify-app.yml index 72c88d2d3..6a9ce9443 100644 --- a/.github/workflows/dhis2-verify-app.yml +++ b/.github/workflows/dhis2-verify-app.yml @@ -124,7 +124,8 @@ jobs: if: | failure() && !cancelled() && - github.ref == 'refs/heads/master' + github.ref == 'refs/heads/master' && + contains(github.event.head_commit.message, 'chore(release)') steps: - name: Checkout code uses: actions/checkout@master @@ -140,13 +141,13 @@ jobs: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} payload: | { - "text": ":small_red_triangle_down: :maps-app: Maps version ${{ steps.extract_version.outputs.version }} release ", + "text": ":small_red_triangle_down: :maps-app: Maps release ", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": ":small_red_triangle_down: :maps-app: Maps version ${{ steps.extract_version.outputs.version }} release " + "text": ":small_red_triangle_down: :maps-app: Maps release " } } ] @@ -160,7 +161,8 @@ jobs: if: | success() && !cancelled() && - github.ref == 'refs/heads/master' + github.ref == 'refs/heads/master' && + contains(github.event.head_commit.message, 'chore(release)') steps: - name: Checkout code uses: actions/checkout@master