Skip to content

Commit aa1629a

Browse files
authored
Merge pull request OCHA-DAP#112 from OCHA-DAP/HDXDSYS-780-schedule
Enable db export schedule
2 parents 9fdb78f + a3d1208 commit aa1629a

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/db_export.yaml

+18-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: Database Export
22

33
on:
44
workflow_dispatch: # Add a run button on GitHub
5-
push:
6-
tags:
7-
- "*"
5+
release:
6+
types: [published]
7+
schedule:
8+
- cron: "2 22,11 * * *"
89

910
jobs:
1011
build:
@@ -63,3 +64,17 @@ jobs:
6364
with:
6465
name: warnings-errors
6566
path: warnings_errors.log
67+
68+
- name: Send mail
69+
if: failure()
70+
uses: dawidd6/action-send-mail@v3
71+
with:
72+
server_address: ${{secrets.EMAIL_SERVER}}
73+
server_port: ${{secrets.EMAIL_PORT}}
74+
username: ${{secrets.EMAIL_USERNAME}}
75+
password: ${{secrets.EMAIL_PASSWORD}}
76+
subject: "FAILED: ${{github.repository}} database export job"
77+
body: GitHub Actions database export job for ${{github.repository}} failed!
78+
to: ${{secrets.EMAIL_LIST}}
79+
from: ${{secrets.EMAIL_FROM}}
80+
content_type: text/html

0 commit comments

Comments
 (0)