-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (31 loc) · 1.03 KB
/
backup-prod-db.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
28
29
30
31
32
name: Back Up Prod Database
on:
workflow_dispatch:
schedule:
# Runs script at 1AM UTC (8PM or 9PM ET) everyday.
- cron: '0 1 * * *'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Use Yarn Cache
uses: actions/cache@v4
with:
path: ~/.cache/yarn
key: yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: yarn-
- name: Install
run: yarn
- name: Back Up Prod Database
env:
FIREBASE_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }}
FIREBASE_BACKUP_PRIVATE_KEY: ${{ secrets.FIREBASE_BACKUP_PRIVATE_KEY }}
FIREBASE_PRIVATE_KEY_ID: ${{ secrets.FIREBASE_PRIVATE_KEY_ID }}
FIREBASE_BACKUP_PRIVATE_KEY_ID: ${{ secrets.FIREBASE_BACKUP_PRIVATE_KEY_ID }}
run: yarn workspace backend backup-prod-db