-
Notifications
You must be signed in to change notification settings - Fork 37
27 lines (25 loc) · 1.06 KB
/
email-success.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) 2020-2023 by the Zeek Project. See LICENSE for details.
on:
check_suite:
type: ['completed']
name: Email about successful Cirrus CI builds
jobs:
continue:
name: After Cirrus CI Failure
if: github.event.check_suite.app.name == 'Cirrus CI' && github.event.check_suite.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
id: get_success_check_run
with:
route: GET /repos/${{ github.repository }}/check-suites/${{ github.event.check_suite.id }}/check-runs?status=completed
mediaType: '{"previews": ["antiope"]}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
echo "Cirrus CI ${{ github.event.check_suite.conclusion }} on SHA ${{ github.event.check_suite.head_sha }}"
echo "SHA ${{ github.event.check_suite.head_sha }}"
echo $MESSAGE
echo "See $CHECK_RUN_URL for details" && true
env:
CHECK_RUN_URL: ${{ fromJson(steps.get_success_check_run.outputs.data).check_runs[0].html_url }}