-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.33 KB
/
backup.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Backup Job
on:
schedule:
- cron: '30 07 * * *'
jobs:
backup:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
mongodb-version: [4.4]
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Set dns
run: |
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
- name: Install dependencies
run: npm install
- name: mongo to drive
env:
DB: ${{ secrets.DB }}
G_DRIVE_CLIENT_ID: ${{ secrets.G_DRIVE_CLIENT_ID }}
G_DRIVE_CLIENT_SECRET: ${{ secrets.G_DRIVE_CLIENT_SECRET }}
G_DRIVE_REDIRECT_URIS: ${{ secrets.G_DRIVE_REDIRECT_URIS }}
G_DRIVE_ACCESS_TOKEN: ${{ secrets.G_DRIVE_ACCESS_TOKEN }}
G_DRIVE_REFRESH_TOKEN: ${{ secrets.G_DRIVE_REFRESH_TOKEN }}
G_DRIVE_TOKEN_EXPIRY_DATE: ${{ secrets.G_DRIVE_TOKEN_EXPIRY_DATE }}
G_DRIVE_BACKUP_FOLDER_ID: ${{ secrets.G_DRIVE_BACKUP_FOLDER_ID }}
run: npm start