-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (38 loc) · 1.33 KB
/
restore.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
name: Restore from S3 Backup
on:
workflow_run:
workflows: ["Deploy Feldera Pipeline"]
types:
- completed
workflow_dispatch:
jobs:
backup:
runs-on: [ self-hosted, skylake40 ]
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v4 # repo checkout
- name: Setup rust toolchain
run: |
rustup update stable
rustup default stable
rustup set profile minimal
- name: Rust Cache # cache the rust build artefacts
uses: Swatinem/rust-cache@v2
- name: Download and install fda binary
run: cargo install fda
# Set up AWS CLI
- name: Configure AWS CLI
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# Ensure the restore script is executable
- name: Make backup script executable
run: chmod +x ./backup/restore.sh
# Run the restore script
- name: Run restore script
env:
FELDERA_HOST: ${{ secrets.FELDERA_HOST }}
FELDERA_API_KEY: ${{ secrets.FELDERA_API_KEY }}
run: ./backup/restore.sh