-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: wip * fix: content now visible in post * chore: updated button text * ci: webbhook to post failure in teams channel
- Loading branch information
1 parent
64121e1
commit fa635ad
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: 'ci: smoke test failure webhook' | ||
|
||
on: | ||
push: | ||
branches: | ||
- build/smoketest-webhook | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Post failure in Teams channel | ||
env: | ||
TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }} | ||
REPO_NAME: ${{ github.repository }} | ||
BRANCH_NAME: ${{ github.ref }} | ||
COMMIT_SHA: ${{ github.sha }} | ||
RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' | ||
run: | | ||
curl -H 'Content-Type: application/json' -d '{ | ||
"type": "message", | ||
"attachments": [ | ||
{ | ||
"contentType": "application/vnd.microsoft.card.adaptive", | ||
"content": { | ||
"type": "AdaptiveCard", | ||
"version": "1.0", | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"size": "Medium", | ||
"weight": "Bolder", | ||
"text": "Build Failure Notification" | ||
}, | ||
{ | ||
"type": "FactSet", | ||
"facts": [ | ||
{ | ||
"title": "Repository", | ||
"value": "'"${REPO_NAME}"'" | ||
}, | ||
{ | ||
"title": "Branch", | ||
"value": "'"${BRANCH_NAME}"'" | ||
}, | ||
{ | ||
"title": "Commit", | ||
"value": "'"${COMMIT_SHA}"'" | ||
} | ||
] | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "View failed run", | ||
"url": "'"${RUN_URL}"'" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}' "$TEAMS_WEBHOOK_URL" |