Skip to content

Commit

Permalink
chore: add a test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Aug 14, 2023
1 parent da9c27e commit c962a2c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/slack-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: slack-test

on:
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Intentionally failing step
run: exit 123

- name: Notify about failures
if: failure()
uses: slackapi/slack-github-action@v1
with:
payload: |
{
"text": "",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Workflow "${{ github.workflow }}" failed: https://github.com/${{ github.repository_owner }}/${{ github.repository}}/actions/runs/${{ github.run_id }})"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 comments on commit c962a2c

Please sign in to comment.