Sync S3 files #5187
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: Sync S3 files | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "* */6 * * *" | |
env: | |
ENV_NAME: prod | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
concurrency: ci-${{ github.ref }}-prod-sync | |
environment: | |
name: prod-sync | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-skip-session-tagging: true | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_ID }} | |
aws-region: ca-central-1 | |
role-to-assume: ${{ secrets.AWS_SA_ROLE_ARN }} | |
role-duration-seconds: 900 | |
role-session-name: ci-prod-sync | |
- name: Setup ENV file | |
run: cp ./.config/.env.example ./.env | |
- name: Sync S3 files from prod to test | |
run: make aws-sync-files-from-prod-to-test |