-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.11 KB
/
delern.yml
File metadata and controls
37 lines (32 loc) · 1.11 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
on:
push:
schedule:
# Every day at 1:02 UTC: https://crontab.guru/#2_1_*_*_*
- cron: "2 1 * * *"
jobs:
backup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/checkout@v4
with:
repository: futureware-tech/delern-database-backup
token: ${{ secrets.DATABASE_BACKUP_GITHUB_TOKEN }}
path: database-storage
- run: |
export GOOGLE_APPLICATION_CREDENTIALS="${HOME?}/.google_application_credentials.json" &&
echo '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA_DELERN }}' | \
base64 -d > "${GOOGLE_APPLICATION_CREDENTIALS?}" &&
npx firebase-tools \
--project "${PROJECT?}" \
database:get / | gzip > database-storage/database.json.gz
env:
PROJECT: delern-e1b33
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Automatic Realtime Database backup"
repository: database-storage
- uses: liskin/gh-workflow-keepalive@v1