|
54 | 54 | with: |
55 | 55 | bf_version: ${{ needs.precommit.outputs.bf_version }} |
56 | 56 | # Consider manual builds or 8AM Pacific scheduled builds as a release candidate |
57 | | - queue_prod_release: ${{ github.event_name == 'workflow_dispatch' || github.event.schedule == '0 15 * * *' }} |
| 57 | + queue_prod_release: false |
58 | 58 | test_tag: "test-${{ needs.precommit.outputs.bf_version }}" |
59 | 59 | release_tag: "${{ needs.precommit.outputs.bf_version }}" |
60 | 60 | BATFISH_GITHUB_BATFISH_REPO: "${{ needs.precommit.outputs.batfish_repo }}" |
|
64 | 64 | PYBATFISH_PYPI_TOKEN: ${{ secrets.PYBATFISH_PYPI_TOKEN }} |
65 | 65 | BATFISH_DOCKER_LOGIN_TOKEN: ${{ secrets.BATFISH_DOCKER_LOGIN_TOKEN }} |
66 | 66 | OPEN_SOURCE_BUILDKITEBOT_PUBLIC_REPO_TOKEN: ${{ secrets.OPEN_SOURCE_BUILDKITEBOT_PUBLIC_REPO_TOKEN }} |
| 67 | + |
| 68 | + # Send Slack notification on failure for scheduled or post-merge jobs on master branch |
| 69 | + notify_slack_on_failure: |
| 70 | + needs: |
| 71 | + - precommit |
| 72 | + - test |
| 73 | + - upload |
| 74 | + if: | |
| 75 | + always() |
| 76 | + # failure() && |
| 77 | + # github.ref == 'refs/heads/master' && |
| 78 | + # (github.event_name == 'schedule' || github.event_name == 'push') && |
| 79 | + # !(github.event_name == 'workflow_dispatch' || github.event.schedule == '0 15 * * *') |
| 80 | + runs-on: ubuntu-latest |
| 81 | + steps: |
| 82 | + - name: Send Slack notification |
| 83 | + uses: slackapi/slack-github-action@v2.1.0 |
| 84 | + with: |
| 85 | + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 86 | + webhook-type: incoming-webhook |
| 87 | + payload: | |
| 88 | + { |
| 89 | + "text": "*Docker cross-version tests and upload workflow failed*", |
| 90 | + "blocks": [ |
| 91 | + { |
| 92 | + "type": "section", |
| 93 | + "text": { |
| 94 | + "type": "mrkdwn", |
| 95 | + "text": "*Docker cross-version tests and upload workflow failed*" |
| 96 | + } |
| 97 | + }, |
| 98 | + { |
| 99 | + "type": "section", |
| 100 | + "fields": [ |
| 101 | + { |
| 102 | + "type": "mrkdwn", |
| 103 | + "text": "*Workflow:*\nDocker cross-version tests and upload" |
| 104 | + }, |
| 105 | + { |
| 106 | + "type": "mrkdwn", |
| 107 | + "text": "*Status:*\nFailed" |
| 108 | + }, |
| 109 | + { |
| 110 | + "type": "mrkdwn", |
| 111 | + "text": "*Trigger:*\n${{ github.event_name }}" |
| 112 | + }, |
| 113 | + { |
| 114 | + "type": "mrkdwn", |
| 115 | + "text": "*Branch:*\nmaster" |
| 116 | + } |
| 117 | + ] |
| 118 | + }, |
| 119 | + { |
| 120 | + "type": "actions", |
| 121 | + "elements": [ |
| 122 | + { |
| 123 | + "type": "button", |
| 124 | + "text": { |
| 125 | + "type": "plain_text", |
| 126 | + "text": "View Workflow Run in GitHub Actions" |
| 127 | + }, |
| 128 | + "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" |
| 129 | + } |
| 130 | + ] |
| 131 | + } |
| 132 | + ] |
| 133 | + } |
0 commit comments