-
Notifications
You must be signed in to change notification settings - Fork 16
39 lines (31 loc) · 928 Bytes
/
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
name: backup
on:
schedule:
- cron: '0 */4 * * *'
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
backup:
name: Backup production DB
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::315513665747:role/aiarena-DeployRole-NUZWXPWHC0MZ
aws-region: eu-central-1
- name: Confirm AWS identity
run: aws sts get-caller-identity
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install python dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: pip install -r requirements.LOCAL.txt
- name: Perform production DB backup
run: ./run.py production-backup