Skip to content

Commit 5823955

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: [skip ci] Fix Slack notification
2 parents 49fd630 + edd4980 commit 5823955

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

.github/actions/apt-x32/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ runs:
1313
apt-get install -y \
1414
autoconf \
1515
bison \
16+
curl \
1617
g++-multilib \
1718
gcc-multilib \
1819
language-pack-de \

.github/actions/notify-slack/action.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ inputs:
55
runs:
66
using: composite
77
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 }}
8+
- shell: bash
9+
run: >-
10+
curl -X POST -H 'Content-type: application/json' --data '{"attachments": [{"text": "Job in *nightly* failed", "footer": "<https://github.com/php/php-src/actions/runs/${{ github.run_id }}|View Run>", "color": "danger", "mrkdwn_in": ["text"]}]}' ${{ inputs.token }}

.github/workflows/nightly.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
id: set-matrix
3434
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}"
3535
- name: Notify Slack
36-
if: always()
36+
if: failure()
3737
uses: ./.github/actions/notify-slack
3838
with:
3939
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -123,7 +123,7 @@ jobs:
123123
- name: Verify generated files are up to date
124124
uses: ./.github/actions/verify-generated-files
125125
- name: Notify Slack
126-
if: always()
126+
if: failure()
127127
uses: ./.github/actions/notify-slack
128128
with:
129129
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -199,7 +199,7 @@ jobs:
199199
-d opcache.jit_buffer_size=16M
200200
-d opcache.jit=1205
201201
- name: Notify Slack
202-
if: always()
202+
if: failure()
203203
uses: ./.github/actions/notify-slack
204204
with:
205205
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -267,7 +267,7 @@ jobs:
267267
- name: Verify generated files are up to date
268268
uses: ./.github/actions/verify-generated-files
269269
- name: Notify Slack
270-
if: always()
270+
if: failure()
271271
uses: ./.github/actions/notify-slack
272272
with:
273273
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -313,7 +313,7 @@ jobs:
313313
if: always()
314314
run: bash <(curl -s https://codecov.io/bash)
315315
- name: Notify Slack
316-
if: always()
316+
if: failure()
317317
uses: ./.github/actions/notify-slack
318318
with:
319319
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -433,7 +433,7 @@ jobs:
433433
exit 1
434434
fi
435435
- name: Notify Slack
436-
if: always()
436+
if: failure()
437437
uses: ./.github/actions/notify-slack
438438
with:
439439
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -516,7 +516,7 @@ jobs:
516516
- name: Verify generated files are up to date
517517
uses: ./.github/actions/verify-generated-files
518518
- name: Notify Slack
519-
if: always()
519+
if: failure()
520520
uses: ./.github/actions/notify-slack
521521
with:
522522
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -614,7 +614,7 @@ jobs:
614614
- name: Verify generated files are up to date
615615
uses: ./.github/actions/verify-generated-files
616616
- name: Notify Slack
617-
if: always()
617+
if: failure()
618618
uses: ./.github/actions/notify-slack
619619
with:
620620
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -674,7 +674,7 @@ jobs:
674674
- name: Verify generated files are up to date
675675
uses: ./.github/actions/verify-generated-files
676676
- name: Notify Slack
677-
if: always()
677+
if: failure()
678678
uses: ./.github/actions/notify-slack
679679
with:
680680
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -782,7 +782,7 @@ jobs:
782782
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
783783
make -j$(/usr/bin/nproc)
784784
- name: Notify Slack
785-
if: always()
785+
if: failure()
786786
uses: ./.github/actions/notify-slack
787787
with:
788788
token: ${{ secrets.ACTION_MONITORING_SLACK }}

0 commit comments

Comments
 (0)