A way to manage dags from s3 with preprod and prod version #1
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: Push DAGs to S3 | |
on: | |
- pull_request | |
env: | |
S3_HOST: https://cellar-c2.services.clever-cloud.com | |
FOLDER_SOURCE: development/ | |
S3_BUCKET_DESTINATION: s3://qfdmo-airflow-dags/preprod/ | |
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }} | |
jobs: | |
backup-production: | |
name: Copy local folder to Preprod s3 bucket | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install AWS CLI dependencies | |
run: | | |
pip install awscli | |
- name: Backup | |
run: aws --endpoint-url ${{ env.S3_HOST }} s3 sync --quiet ${{ env.FOLDER_SOURCE }} ${{ env.S3_BUCKET_DESTINATION }} |