Skip to content

Commit

Permalink
add Slack workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-yankee committed Jan 27, 2025
1 parent 775a247 commit 4eb53a1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ jobs:
python-version: '3.12'
- name: file_sync test
run: python ./private/test/file_sync_test.py
slack_test_fail:
runs-on: ubuntu-latest
steps:
- name: fail step
run: exit 1
31 changes: 31 additions & 0 deletions .github/workflows/slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-License-Identifier: MIT-0

---
name: slack
on:
workflow_run:
workflows: [ci]
types: [completed]
# TODO: testing steps to initially register the workflow on GHA, REMOVE
push:
pull_request:

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Build Cop Slack
uses: ravsamhq/notify-slack-action@v2
with:
notify_when: "failure"
status: ${{ github.event.workflow_run.conclusion }}
notification_title: >
${{github.event.workflow_run.name}} -
${{github.event.workflow_run.conclusion}} on ${{github.event.workflow_run.head_branch}} -
<${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>
message_format: >
:fire: *${{github.event.workflow_run.name}}*
${{github.event.workflow_run.conclusion}} in
<${{github.server_url}}/${{github.repository}}/tree/${{github.event.workflow_run.head_branch}}|${{github.repository}}>
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BUILDCOP_URL }}

0 comments on commit 4eb53a1

Please sign in to comment.