Skip to content

Commit edd4980

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: [skip ci] Fix Slack notification
2 parents 023e17a + 2eeff96 commit edd4980

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
id: set-matrix
3232
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}"
3333
- name: Notify Slack
34-
if: always()
34+
if: failure()
3535
uses: ./.github/actions/notify-slack
3636
with:
3737
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -114,7 +114,7 @@ jobs:
114114
- name: Verify generated files are up to date
115115
uses: ./.github/actions/verify-generated-files
116116
- name: Notify Slack
117-
if: always()
117+
if: failure()
118118
uses: ./.github/actions/notify-slack
119119
with:
120120
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -190,7 +190,7 @@ jobs:
190190
-d opcache.jit_buffer_size=16M
191191
-d opcache.jit=1205
192192
- name: Notify Slack
193-
if: always()
193+
if: failure()
194194
uses: ./.github/actions/notify-slack
195195
with:
196196
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -258,7 +258,7 @@ jobs:
258258
- name: Verify generated files are up to date
259259
uses: ./.github/actions/verify-generated-files
260260
- name: Notify Slack
261-
if: always()
261+
if: failure()
262262
uses: ./.github/actions/notify-slack
263263
with:
264264
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -297,7 +297,7 @@ jobs:
297297
if: always()
298298
run: bash <(curl -s https://codecov.io/bash)
299299
- name: Notify Slack
300-
if: always()
300+
if: failure()
301301
uses: ./.github/actions/notify-slack
302302
with:
303303
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -417,7 +417,7 @@ jobs:
417417
exit 1
418418
fi
419419
- name: Notify Slack
420-
if: always()
420+
if: failure()
421421
uses: ./.github/actions/notify-slack
422422
with:
423423
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -493,7 +493,7 @@ jobs:
493493
- name: Verify generated files are up to date
494494
uses: ./.github/actions/verify-generated-files
495495
- name: Notify Slack
496-
if: always()
496+
if: failure()
497497
uses: ./.github/actions/notify-slack
498498
with:
499499
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -590,7 +590,7 @@ jobs:
590590
- name: Verify generated files are up to date
591591
uses: ./.github/actions/verify-generated-files
592592
- name: Notify Slack
593-
if: always()
593+
if: failure()
594594
uses: ./.github/actions/notify-slack
595595
with:
596596
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -650,7 +650,7 @@ jobs:
650650
- name: Verify generated files are up to date
651651
uses: ./.github/actions/verify-generated-files
652652
- name: Notify Slack
653-
if: always()
653+
if: failure()
654654
uses: ./.github/actions/notify-slack
655655
with:
656656
token: ${{ secrets.ACTION_MONITORING_SLACK }}

0 commit comments

Comments
 (0)