summaryrefslogtreecommitdiff
path: root/.github/workflows/cirrus-notify.yml
blob: 3fd693c2a368a69bec8ef95129ee76608b4d6950 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
on:
  check_suite:
    type: ['completed']
name: Cirrus CI failure notification
jobs:
  cirrus-notify:
    name: After Cirrus CI Failure
    if: >-
      github.event.check_suite.app.name == 'Cirrus CI'
      && github.event.check_suite.conclusion != 'success'
      && github.event.check_suite.conclusion != 'cancelled'
      && github.event.check_suite.conclusion != 'skipped'
    runs-on: ubuntu-latest
    steps:
      - name: Dump GitHub context
        env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"
      - uses: ruby/action-slack@v3.0.0
        with:
          payload: |
            {
              "ci": "Cirrus CI",
              "env": "Cirrus CI",
              "url": "https://cirrus-ci.com/github/ruby/ruby",
              "commit": "${{ github.sha }}",
              "branch": "${{ github.ref_name }}"
            }
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot