Skip to content

Commit

Permalink
conan-public: notify on scheduled build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
thenextman committed Jan 22, 2024
1 parent 1a23ea8 commit 94ffbfa
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/conan-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,31 @@ jobs:
if: github.event_name != 'schedule'
uses: ./.github/workflows/conan-publish.yml
secrets: inherit

notify:
name: Notify failure
runs-on: ubuntu-latest
if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name == 'schedule' }}
needs:
- generate-matrix
- build
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_ARCHITECTURE }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- name: Send slack notification
id: slack
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.repository }}* :fire::fire::fire::fire::fire: \n The scheduled build for *${{ github.repository }}* is <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|broken>"
}
}
]
}

0 comments on commit 94ffbfa

Please sign in to comment.