Skip to content

Commit

Permalink
ci: webbhook to post failure in teams channel
Browse files Browse the repository at this point in the history
  • Loading branch information
mistermalm committed Nov 1, 2024
1 parent 569193a commit 0737d42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Scheduled Release Smoke Test
name: 'ci: smoke test scheduled release'

on:
schedule:
Expand Down Expand Up @@ -210,3 +210,6 @@ jobs:
- name: Check results
run: |
echo "All previous jobs have completed successfully!"
- name: Notify in Teams on failure
if: failure()
uses: ./.github/workflows/smoke-test-webhook.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Smoke test webhook
name: 'ci: smoke test failure webhook'

on:
push:
Expand All @@ -8,19 +8,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run your build or tests
run: |
echo "Running build/test..."
# Replace this with your actual build/test command
exit 1 # Simulate failure
- name: Notify Teams on failure
if: failure()
- name: Post failure in Teams channel
env:
TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }}
REPO_NAME: ${{ github.repository }}
Expand Down Expand Up @@ -64,7 +53,7 @@ jobs:
"actions": [
{
"type": "Action.OpenUrl",
"title": "View failed jobs",
"title": "View failed run",
"url": "'"${RUN_URL}"'"
}
]
Expand Down

0 comments on commit 0737d42

Please sign in to comment.