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 8
8
jobs :
9
9
deploy :
10
10
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' }}
12
12
steps :
13
13
- uses : actions/checkout@v3
14
14
- name : Tag and Push Gem
Original file line number Diff line number Diff line change 1
1
name : CI
2
2
3
- on : [push, pull_request]
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ schedule :
9
+ - cron : " 0 0 * * *"
4
10
5
11
jobs :
6
12
rspec :
10
16
ruby :
11
17
# See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions
12
18
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
13
- - ' 3.0'
19
+ - " 3.0"
14
20
- 3.1
15
21
env :
16
22
BUNDLE_GEMFILE : Gemfile
36
42
ruby-version : 3.1
37
43
- name : Run static type checks
38
44
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