-
Notifications
You must be signed in to change notification settings - Fork 20
32 lines (32 loc) · 1.05 KB
/
database-dumps.yaml
File metadata and controls
32 lines (32 loc) · 1.05 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
name: Database dumps
on:
schedule:
# At 04:00 every day.
- cron: "* 4 * * *"
# Let end users trigger a dump.
workflow_dispatch:
# Don't do multiple database dumps at the same time!
concurrency:
group: database-dump
cancel-in-progress: true
jobs:
dump-database-to-raito-s3:
runs-on: ubuntu-latest
steps:
- name: Setup WARP to gain IPv6
uses: fscarmen/warp-on-actions@v1.1
with:
stack: dual
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v29
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
- name: Trust staging server public SSH host keys
run: cat ./staging/staging_host_keys >> ~/.ssh/known_hosts
- name: Dump database to S3
run: nix-shell default.nix -A ci --run "dump-database"
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"