Skip to content

Commit e7e721a

Browse files
committed
Replace Slack notification action
1 parent fcfc91a commit e7e721a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎.github/workflows/transloaditkit-ci.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ jobs:
1414
run: swift build
1515
- name: Run tests
1616
run: swift test
17-
- uses: 8398a7/action-slack@v3
17+
- name: Send Slack notification
1818
if: failure() && env.BRANCH == 'main'
19-
with:
20-
status: failure
2119
env:
2220
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
21+
SLACK_TEXT: >-
22+
${{ github.workflow }} failed for ${{ github.repository }} on ${{ github.ref_name }}:
23+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
24+
run: |
25+
node -e "process.stdout.write(JSON.stringify({ text: process.env.SLACK_TEXT }))" |
26+
curl --fail-with-body -X POST -H 'Content-type: application/json' --data-binary @- "$SLACK_WEBHOOK_URL"

0 commit comments

Comments
 (0)