1 parent fcfc91a commit e7e721aCopy full SHA for e7e721a
1 file changed
.github/workflows/transloaditkit-ci.yml
@@ -14,9 +14,13 @@ jobs:
14
run: swift build
15
- name: Run tests
16
run: swift test
17
- - uses: 8398a7/action-slack@v3
+ - name: Send Slack notification
18
if: failure() && env.BRANCH == 'main'
19
- with:
20
- status: failure
21
env:
22
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_TEXT: >-
+ ${{ 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