Skip to content

Commit ce47e59

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: [skip ci] Notify Slack on nightly failure
2 parents 9a81231 + aeb32bb commit ce47e59

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 15 additions & 0 deletions
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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ jobs:
3232
- name: Generate Matrix
3333
id: set-matrix
3434
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}"
35+
- name: Notify Slack
36+
if: always()
37+
uses: ./.github/actions/notify-slack
38+
with:
39+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
3540
LINUX_X64:
3641
needs: GENERATE_MATRIX
3742
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -117,6 +122,11 @@ jobs:
117122
-d opcache.jit=1205
118123
- name: Verify generated files are up to date
119124
uses: ./.github/actions/verify-generated-files
125+
- name: Notify Slack
126+
if: always()
127+
uses: ./.github/actions/notify-slack
128+
with:
129+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
120130
LINUX_X32:
121131
needs: GENERATE_MATRIX
122132
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -188,6 +198,11 @@ jobs:
188198
-d opcache.enable_cli=1
189199
-d opcache.jit_buffer_size=16M
190200
-d opcache.jit=1205
201+
- name: Notify Slack
202+
if: always()
203+
uses: ./.github/actions/notify-slack
204+
with:
205+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
191206
MACOS:
192207
needs: GENERATE_MATRIX
193208
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -251,6 +266,11 @@ jobs:
251266
-d opcache.jit=1205
252267
- name: Verify generated files are up to date
253268
uses: ./.github/actions/verify-generated-files
269+
- name: Notify Slack
270+
if: always()
271+
uses: ./.github/actions/notify-slack
272+
with:
273+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
254274
COVERAGE_DEBUG_NTS:
255275
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
256276
services:
@@ -292,6 +312,11 @@ jobs:
292312
- name: Upload Test Coverage to Codecov.io
293313
if: always()
294314
run: bash <(curl -s https://codecov.io/bash)
315+
- name: Notify Slack
316+
if: always()
317+
uses: ./.github/actions/notify-slack
318+
with:
319+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
295320
COMMUNITY:
296321
needs: GENERATE_MATRIX
297322
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -407,6 +432,11 @@ jobs:
407432
if [ $EXIT_CODE -gt 128 ]; then
408433
exit 1
409434
fi
435+
- name: Notify Slack
436+
if: always()
437+
uses: ./.github/actions/notify-slack
438+
with:
439+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
410440
OPCACHE_VARIATION:
411441
needs: GENERATE_MATRIX
412442
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -485,6 +515,11 @@ jobs:
485515
-d opcache.file_cache_only=1
486516
- name: Verify generated files are up to date
487517
uses: ./.github/actions/verify-generated-files
518+
- name: Notify Slack
519+
if: always()
520+
uses: ./.github/actions/notify-slack
521+
with:
522+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
488523
MSAN:
489524
needs: GENERATE_MATRIX
490525
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -578,6 +613,11 @@ jobs:
578613
-d opcache.enable_cli=1
579614
- name: Verify generated files are up to date
580615
uses: ./.github/actions/verify-generated-files
616+
- name: Notify Slack
617+
if: always()
618+
uses: ./.github/actions/notify-slack
619+
with:
620+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
581621
LIBMYSQLCLIENT:
582622
needs: GENERATE_MATRIX
583623
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -633,6 +673,11 @@ jobs:
633673
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
634674
- name: Verify generated files are up to date
635675
uses: ./.github/actions/verify-generated-files
676+
- name: Notify Slack
677+
if: always()
678+
uses: ./.github/actions/notify-slack
679+
with:
680+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
636681
PECL:
637682
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
638683
runs-on: ubuntu-22.04
@@ -736,3 +781,8 @@ jobs:
736781
/opt/php/bin/phpize
737782
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
738783
make -j$(/usr/bin/nproc)
784+
- name: Notify Slack
785+
if: always()
786+
uses: ./.github/actions/notify-slack
787+
with:
788+
token: ${{ secrets.ACTION_MONITORING_SLACK }}

0 commit comments

Comments
 (0)