Skip to content

Commit 3a21a87

Browse files
committed
[skip ci] Notify Slack on nightly failure
1 parent 8a749c7 commit 3a21a87

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Notify Slack
2+
inputs:
3+
token:
4+
required: true
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Notify Slack
9+
if: always()
10+
uses: ravsamhq/notify-slack-action@v1
11+
with:
12+
status: ${{ job.status }}
13+
notify_when: 'failure'
14+
env:
15+
SLACK_WEBHOOK_URL: ${{ inputs.token }}

.github/workflows/nightly.yml

+45
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
- name: Generate Matrix
3131
id: set-matrix
3232
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}"
33+
- name: Notify Slack
34+
if: always()
35+
uses: ./.github/actions/notify-slack
36+
with:
37+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
3338
LINUX_X64:
3439
needs: GENERATE_MATRIX
3540
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -104,6 +109,11 @@ jobs:
104109
-d opcache.jit=1205
105110
- name: Verify generated files are up to date
106111
uses: ./.github/actions/verify-generated-files
112+
- name: Notify Slack
113+
if: always()
114+
uses: ./.github/actions/notify-slack
115+
with:
116+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
107117
LINUX_X32:
108118
needs: GENERATE_MATRIX
109119
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -175,6 +185,11 @@ jobs:
175185
-d opcache.enable_cli=1
176186
-d opcache.jit_buffer_size=16M
177187
-d opcache.jit=1205
188+
- name: Notify Slack
189+
if: always()
190+
uses: ./.github/actions/notify-slack
191+
with:
192+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
178193
MACOS:
179194
needs: GENERATE_MATRIX
180195
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -233,6 +248,11 @@ jobs:
233248
-d opcache.jit=1205
234249
- name: Verify generated files are up to date
235250
uses: ./.github/actions/verify-generated-files
251+
- name: Notify Slack
252+
if: always()
253+
uses: ./.github/actions/notify-slack
254+
with:
255+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
236256
COVERAGE_DEBUG_NTS:
237257
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
238258
runs-on: ubuntu-20.04
@@ -267,6 +287,11 @@ jobs:
267287
- name: Upload Test Coverage to Codecov.io
268288
if: always()
269289
run: bash <(curl -s https://codecov.io/bash)
290+
- name: Notify Slack
291+
if: always()
292+
uses: ./.github/actions/notify-slack
293+
with:
294+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
270295
COMMUNITY:
271296
needs: GENERATE_MATRIX
272297
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -382,6 +407,11 @@ jobs:
382407
if [ $EXIT_CODE -gt 128 ]; then
383408
exit 1
384409
fi
410+
- name: Notify Slack
411+
if: always()
412+
uses: ./.github/actions/notify-slack
413+
with:
414+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
385415
OPCACHE_VARIATION:
386416
needs: GENERATE_MATRIX
387417
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -453,6 +483,11 @@ jobs:
453483
-d opcache.file_cache_only=1
454484
- name: Verify generated files are up to date
455485
uses: ./.github/actions/verify-generated-files
486+
- name: Notify Slack
487+
if: always()
488+
uses: ./.github/actions/notify-slack
489+
with:
490+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
456491
MSAN:
457492
needs: GENERATE_MATRIX
458493
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -545,6 +580,11 @@ jobs:
545580
-d opcache.enable_cli=1
546581
- name: Verify generated files are up to date
547582
uses: ./.github/actions/verify-generated-files
583+
- name: Notify Slack
584+
if: always()
585+
uses: ./.github/actions/notify-slack
586+
with:
587+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
548588
LIBMYSQLCLIENT:
549589
needs: GENERATE_MATRIX
550590
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -600,3 +640,8 @@ jobs:
600640
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
601641
- name: Verify generated files are up to date
602642
uses: ./.github/actions/verify-generated-files
643+
- name: Notify Slack
644+
if: always()
645+
uses: ./.github/actions/notify-slack
646+
with:
647+
token: ${{ secrets.ACTION_MONITORING_SLACK }}

0 commit comments

Comments
 (0)