-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: send notifications to teams channel (#895)
- Loading branch information
Showing
4 changed files
with
49 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Post to teams | ||
description: Post a message to the teams channel | ||
|
||
inputs: | ||
webhook: | ||
description: "The webhook to send the message to." | ||
required: true | ||
message: | ||
description: "The message to be sent. Note that you may not use quotes or escaped quotes in your message." | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Post to teams | ||
shell: bash | ||
run: | | ||
run_url="${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" | ||
payload="$(printf '{"workflow_name": "%s", "job_id": "%s", "run_id": "%s", "ref": "%s", "message": "%s", "run_url": "%s"}' \ | ||
"${{github.workflow}}" "${{github.job}}" "${{github.run_id}}" "${{github.ref_name}}" "${{inputs.message}}" "${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}")" | ||
curl \ | ||
-H "Content-Type: application/json" \ | ||
-d "$payload" \ | ||
"${{inputs.webhook}}" |
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
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: update rpm packages | |
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 19 * * 0' # 7pm UTC on Sundays | ||
- cron: "0 19 * * 0" # 7pm UTC on Sundays | ||
|
||
jobs: | ||
update-rpm-packages: | ||
|
@@ -36,3 +36,9 @@ jobs: | |
committer: edgelessci <[email protected]> | ||
author: edgelessci <[email protected]> | ||
token: ${{ secrets.NUNKI_CI_COMMIT_PUSH_PR }} | ||
- name: Notify teams channel of failure | ||
if: ${{ failure() && github.ref == 'main' }} | ||
uses: ./.github/actions/post_to_teams | ||
with: | ||
webhook: ${{ secrets.TEAMS_CI_WEBHOOK }} | ||
message: "Updating RPM packages failed" |