File tree 2 files changed +24
-4
lines changed 2 files changed +24
-4
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.6'
19
+ - " 3.0.6"
14
20
- 3.1
15
21
- 3.2
16
22
- 3.3
27
33
- name : Set up Ruby ${{ matrix.ruby }}
28
34
uses : ruby/setup-ruby@v1
29
35
with :
30
- bundler-cache : false
36
+ bundler-cache : false
31
37
ruby-version : ${{ matrix.ruby }}
32
38
- name : Update bundler
33
39
run : gem install bundler && bundle install
45
51
ruby-version : head
46
52
- name : Run static type checks
47
53
run : bundle exec srb tc
54
+ notify_on_failure :
55
+ runs-on : ubuntu-latest
56
+ needs : [rspec, static_type_check]
57
+ if : ${{ failure() && github.ref == 'refs/heads/main' }}
58
+ env :
59
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
60
+ SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
61
+ steps :
62
+ -
uses :
slackapi/[email protected]
63
+ with :
64
+ payload : |
65
+ {
66
+ "text": "${{ github.repository }}/${{ github.ref }}: FAILED\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
67
+ }
You can’t perform that action at this time.
0 commit comments