mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Start notifying Cirrus CI failures
It looks like Cirrus doesn't natively support notifications and they recomment to use GitHub Actions for it. https://cirrus-ci.org/guide/notifications/ Because I don't know what the payload looks like, I just added a basic payload and dumped GitHub context so that we could improve it later.
This commit is contained in:
parent
1670e96c0d
commit
923aed26ff
1 changed files with 29 additions and 0 deletions
29
.github/workflows/cirrus-notify.yml
vendored
Normal file
29
.github/workflows/cirrus-notify.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
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'
|
||||
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
|
Loading…
Add table
Reference in a new issue