diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index f5c4b73..13d2037 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -72,3 +72,23 @@ jobs: with: files: | docker-compose.yml + + notify-slack: + name: Notify about release failure + needs: [build_application_container, release-compose-files] + 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/build-containers.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>" } } + ]