Skip to content

Commit 3fb8dae

Browse files
github-actions[bot]seanh
authored andcommitted
Apply updates from cookiecutter
This automated commit applies the latest updates from our cookiecutters [1] to this repo. [1]: https://github.com/hypothesis/cookiecutters
1 parent 1bcd6fe commit 3fb8dae

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/slack.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ on:
66
branches: [main]
77
jobs:
88
on-failure:
9-
runs-on: ubuntu-latest
109
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
11-
steps:
12-
- name: Post to Slack
13-
uses: slackapi/[email protected]
14-
with:
15-
channel-id: 'C4K6M7P5E'
16-
slack-message: "A workflow run failed\n*Repo:* `${{ github.event.repository.full_name }}` (${{ github.event.repository.html_url }})\n*Workflow:* ${{ github.event.workflow.name }} (${{ github.event.workflow.html_url }})\n*Branch:* `${{ github.event.workflow_run.head_branch }}`\n*Commit:* `${{ github.event.workflow_run.head_commit.id }}`\n*Run:* ${{ github.event.workflow_run.html_url }}\n*Conclusion:* ${{ github.event.workflow_run.conclusion }}"
17-
env:
18-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
10+
name: Post to Slack
11+
uses: hypothesis/workflows/.github/workflows/slack.yml@main
12+
with:
13+
payload: |
14+
channel: "C4K6M7P5E"
15+
markdown_text: "Failed `${{ github.event.workflow_run.path }}` run (attempt ${{ github.event.workflow_run.run_attempt }}) on `${{ github.event.workflow_run.head_branch }}` in `${{ github.event.workflow_run.repository.full_name }}`: ${{ github.event.workflow_run.html_url }}"
16+
secrets: inherit

0 commit comments

Comments
 (0)