Restore from S3 Backup #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |