mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
32 lines
1.2 KiB
YAML
32 lines
1.2 KiB
YAML
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://github.com/ruby/ruby/actions/runs/${{ github.run_id }}",
|
|
"commit": "${{ github.event.check_suite.head_commit.id }}",
|
|
"branch": "${{ github.event.check_suite.head_branch }}"
|
|
}
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
|
# head_branch can be null. checking it here to see GITHUB_CONTEXT on master.
|
|
if: ${{ github.event.check_suite.head_branch == 'master' }}
|