Skip to content

Commit aeb32bb

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: [skip ci] Notify Slack on nightly failure
2 parents 962aac6 + 3a21a87 commit aeb32bb

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

Diff for: .github/actions/notify-slack/action.yml

+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 }}

Diff for: .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 != '[]' }}
@@ -108,6 +113,11 @@ jobs:
108113
-d opcache.jit=1205
109114
- name: Verify generated files are up to date
110115
uses: ./.github/actions/verify-generated-files
116+
- name: Notify Slack
117+
if: always()
118+
uses: ./.github/actions/notify-slack
119+
with:
120+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
111121
LINUX_X32:
112122
needs: GENERATE_MATRIX
113123
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -179,6 +189,11 @@ jobs:
179189
-d opcache.enable_cli=1
180190
-d opcache.jit_buffer_size=16M
181191
-d opcache.jit=1205
192+
- name: Notify Slack
193+
if: always()
194+
uses: ./.github/actions/notify-slack
195+
with:
196+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
182197
MACOS:
183198
needs: GENERATE_MATRIX
184199
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -242,6 +257,11 @@ jobs:
242257
-d opcache.jit=1205
243258
- name: Verify generated files are up to date
244259
uses: ./.github/actions/verify-generated-files
260+
- name: Notify Slack
261+
if: always()
262+
uses: ./.github/actions/notify-slack
263+
with:
264+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
245265
COVERAGE_DEBUG_NTS:
246266
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
247267
runs-on: ubuntu-20.04
@@ -276,6 +296,11 @@ jobs:
276296
- name: Upload Test Coverage to Codecov.io
277297
if: always()
278298
run: bash <(curl -s https://codecov.io/bash)
299+
- name: Notify Slack
300+
if: always()
301+
uses: ./.github/actions/notify-slack
302+
with:
303+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
279304
COMMUNITY:
280305
needs: GENERATE_MATRIX
281306
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -391,6 +416,11 @@ jobs:
391416
if [ $EXIT_CODE -gt 128 ]; then
392417
exit 1
393418
fi
419+
- name: Notify Slack
420+
if: always()
421+
uses: ./.github/actions/notify-slack
422+
with:
423+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
394424
OPCACHE_VARIATION:
395425
needs: GENERATE_MATRIX
396426
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -462,6 +492,11 @@ jobs:
462492
-d opcache.file_cache_only=1
463493
- name: Verify generated files are up to date
464494
uses: ./.github/actions/verify-generated-files
495+
- name: Notify Slack
496+
if: always()
497+
uses: ./.github/actions/notify-slack
498+
with:
499+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
465500
MSAN:
466501
needs: GENERATE_MATRIX
467502
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -554,6 +589,11 @@ jobs:
554589
-d opcache.enable_cli=1
555590
- name: Verify generated files are up to date
556591
uses: ./.github/actions/verify-generated-files
592+
- name: Notify Slack
593+
if: always()
594+
uses: ./.github/actions/notify-slack
595+
with:
596+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
557597
LIBMYSQLCLIENT:
558598
needs: GENERATE_MATRIX
559599
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
@@ -609,3 +649,8 @@ jobs:
609649
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
610650
- name: Verify generated files are up to date
611651
uses: ./.github/actions/verify-generated-files
652+
- name: Notify Slack
653+
if: always()
654+
uses: ./.github/actions/notify-slack
655+
with:
656+
token: ${{ secrets.ACTION_MONITORING_SLACK }}

0 commit comments

Comments
 (0)