Skip to content

Commit bb30e3d

Browse files
authored
Replace Slack notification action and harden action refs (#430)
1 parent 3f53f4c commit bb30e3d

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ jobs:
253253
path: static-build
254254
- name: Deploy coverage to GitHub Pages
255255
id: deployment
256-
uses: actions/deploy-pages@v4
256+
uses: actions/deploy-pages@v5
257257

258258
coverage:
259259
name: Upload coverage
@@ -267,7 +267,7 @@ jobs:
267267
name: coverage-reports
268268
path: coverage
269269
- name: Upload coverage to Codecov
270-
uses: codecov/codecov-action@v6
270+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2
271271
with:
272272
token: ${{ secrets.CODECOV_TOKEN }}
273273
files: ./coverage/lcov.info
@@ -281,8 +281,12 @@ jobs:
281281
if: ${{ failure() && github.ref == 'refs/heads/main' }}
282282
runs-on: ubuntu-latest
283283
steps:
284-
- uses: 8398a7/action-slack@v3
285-
with:
286-
status: failure
284+
- name: Send Slack notification
287285
env:
288286
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
287+
SLACK_TEXT: >-
288+
${{ github.workflow }} failed for ${{ github.repository }} on ${{ github.ref_name }}:
289+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
290+
run: |
291+
node -e "process.stdout.write(JSON.stringify({ text: process.env.SLACK_TEXT }))" |
292+
curl --fail-with-body -X POST -H 'Content-type: application/json' --data-binary @- "$SLACK_WEBHOOK_URL"

0 commit comments

Comments
 (0)