From cbc6d0cea6146d38ace5fe42e21bd2a634254d7d Mon Sep 17 00:00:00 2001 From: PPawlowski Date: Wed, 8 Jul 2026 22:42:58 +0200 Subject: [PATCH] Add Slack notification to the release workflow --- .github/workflows/release-publish.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 215ce50..e5b8d02 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -29,4 +29,24 @@ jobs: - uses: flowfuse/github-actions-workflows/actions/update-nr-flows@update-nr-flows/v1 with: package: '@flowfuse/node-red-function-gpt' - version: ${{ steps.getVersion.outputs.version }} \ No newline at end of file + version: ${{ steps.getVersion.outputs.version }} + + notify-slack: + name: Notify about release failure + needs: [publish] + if: failure() + runs-on: ubuntu-latest + + steps: + - name: Notify Slack + uses: FlowFuse/github-actions-workflows/actions/slack_notification@slack_notification/v1 + with: + bot-token: ${{ secrets.SLACK_GHBOT_TOKEN }} + mode: channel + blocks: | + [ + { "type": "header", "text": { "type": "plain_text", "text": ":x: ${{ github.workflow }} workflow failed", "emoji": true } }, + { "type": "divider" }, + { "type": "section", "text": { "type": "mrkdwn", "text": "<${{ github.server_url }}/${{ github.repository }}/actions/workflows/release-publish.yml|${{ github.workflow }}> workflow failed to complete successfully." } }, + { "type": "section", "text": { "type": "mrkdwn", "text": "*Workflow run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View>" } } + ]