Skip to content

Commit e0f3219

Browse files
authored
Replace Slack notification action and harden action refs (#102)
1 parent 5c770cb commit e0f3219

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/tests.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ jobs:
2626

2727
steps:
2828
- name: Checkout Repository
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030

3131
- name: Set up JDK
32-
uses: actions/setup-java@v2
32+
uses: actions/setup-java@v5
3333
with:
3434
java-version: ${{ matrix.java }}
3535
distribution: 'adopt'
3636

3737
# This allows us to test Smart CDN Signatures against the Node SDK reference
3838
# implementation for parity.
3939
- name: Set up Node.js
40-
uses: actions/setup-node@v4
40+
uses: actions/setup-node@v6
4141
with:
4242
node-version: 24
4343

@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Upload coverage to Codecov
5454
if: matrix.java == '11'
55-
uses: codecov/codecov-action@v5
55+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2
5656
env:
5757
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5858

@@ -62,8 +62,12 @@ jobs:
6262
runs-on: ubuntu-latest
6363

6464
steps:
65-
- uses: 8398a7/action-slack@v3
66-
with:
67-
status: failure
65+
- name: Send Slack notification
6866
env:
6967
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
68+
SLACK_TEXT: >-
69+
${{ github.workflow }} failed for ${{ github.repository }} on ${{ github.ref_name }}:
70+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
71+
run: |
72+
node -e "process.stdout.write(JSON.stringify({ text: process.env.SLACK_TEXT }))" |
73+
curl --fail-with-body -X POST -H 'Content-type: application/json' --data-binary @- "$SLACK_WEBHOOK_URL"

0 commit comments

Comments
 (0)