File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 88jobs :
99 deploy :
1010 runs-on : ubuntu-latest
11- if : ${{ github.event.workflow_run.conclusion == 'success' }}
11+ if : ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'schedule' }}
1212 steps :
1313 - uses : actions/checkout@v3
1414 - name : Tag and Push Gem
Original file line number Diff line number Diff line change 11name : CI
22
3- on : [push, pull_request]
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ schedule :
9+ - cron : " 0 0 * * *"
410
511jobs :
612 rspec :
1016 ruby :
1117 # See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions
1218 # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
13- - ' 3.0'
19+ - " 3.0"
1420 - 3.1
1521 env :
1622 BUNDLE_GEMFILE : Gemfile
3642 ruby-version : 3.1
3743 - name : Run static type checks
3844 run : bundle exec srb tc
45+ notify_on_failure :
46+ runs-on : ubuntu-latest
47+ needs : [rspec, static_type_check]
48+ if : ${{ failure() && github.ref == 'refs/heads/main' }}
49+ env :
50+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
51+ SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
52+ steps :
53+ -
uses :
slackapi/[email protected] 54+ with :
55+ payload : |
56+ {
57+ "text": "${{ github.repository }}/${{ github.ref }}: FAILED\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
58+ }
You can’t perform that action at this time.
0 commit comments