3
# Format Ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
5
# Required to un-FUBAR default ${{github.workflow}} value
9
# Note: This only applies to the main branch.
11
# N/B: This should correspond to a period slightly after
12
# the last job finishes running. See job defs. at:
13
# https://cirrus-ci.com/settings/repository/6707778565701632
14
- cron: '03 03 * * 1-5'
15
# Debug: Allow triggering job manually in github-actions WebUI
17
# Allow re-use of this workflow by other repositories
18
# Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows
21
SECRET_CIRRUS_API_KEY:
33
# CSV listing of e-mail addresses for delivery failure or error notices
34
RCPTCSV: podman-monitor@lists.podman.io
35
# Filename for table of build-id to cron-name data
36
# (must be in $GITHUB_WORKSPACE/artifacts/)
37
ID_NAME_FILEPATH: './artifacts/id_name.txt'
44
runs-on: ubuntu-latest
46
# This is where the scripts live
47
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
49
repository: containers/podman
51
persist-credentials: false
53
- name: Get failed cron names and Build IDs
55
run: './.github/actions/check_cirrus_cron/cron_failures.sh'
57
- if: steps.cron.outputs.failures > 0
59
run: './.github/actions/check_cirrus_cron/make_email_body.sh'
61
- if: steps.cron.outputs.failures > 0
62
name: Send failure notification e-mail
63
# Ref: https://github.com/dawidd6/action-send-mail
64
uses: dawidd6/action-send-mail@v3.12.0
66
server_address: ${{secrets.ACTION_MAIL_SERVER}}
68
username: ${{secrets.ACTION_MAIL_USERNAME}}
69
password: ${{secrets.ACTION_MAIL_PASSWORD}}
70
subject: Cirrus-CI cron build failures on ${{github.repository}}
72
from: ${{secrets.ACTION_MAIL_SENDER}}
73
body: file://./artifacts/email_body.txt
76
uses: actions/upload-artifact@v4
78
name: ${{ github.job }}_artifacts
82
name: Send error notification e-mail
83
uses: dawidd6/action-send-mail@v3.12.0
85
server_address: ${{secrets.ACTION_MAIL_SERVER}}
87
username: ${{secrets.ACTION_MAIL_USERNAME}}
88
password: ${{secrets.ACTION_MAIL_PASSWORD}}
89
subject: Github workflow error on ${{github.repository}}
91
from: ${{secrets.ACTION_MAIL_SENDER}}
92
body: "Job failed: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"