Repository navigation
58 lines (47 loc) · 1.71 KB
/
Copy pathemail-notification.yml
File metadata and controls
58 lines (47 loc) · 1.71 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Run Email Notification on a CRON Schedule
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
run_email_notification:
runs-on: ubuntu-latest
name: A job to run the email notification cron
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Email Notification Action Step
uses: ./email-notification
id: email-notification
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
JUNO_API_KEY: ${{ secrets.JUNO_API_KEY }}
JUNO_BASE_URL: ${{ secrets.JUNO_BASE_URL }}
JUNO_SENDER_EMAIL: ${{ secrets.JUNO_SENDER_EMAIL }}
JUNO_SENDER_NAME: ${{ secrets.JUNO_SENDER_NAME }}
keepalive-workflow:
name: Keepalive Workflow
runs-on: ubuntu-latest
permissions:
contents: write # allow branch creation & deletion
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Create, Push & Delete Dummy Branch
run: |
# Use run ID for a unique branch name each run
BRANCH="keepalive-${{ github.run_id }}"
# 1) Create new branch
git checkout -b $BRANCH
# 2) Make a dummy commit
echo "keepalive run ${{ github.run_id }} at $(date -u)" >> keepalive.txt
git add keepalive.txt
git commit -m "chore: keepalive commit ${{ github.run_id }}"
# Push the branch
git push origin $BRANCH
# 3) Delete it immediately
git push origin --delete $BRANCH