Skip to content

Deploy v0.0.5 to development by @devsjc #5

Deploy v0.0.5 to development by @devsjc

Deploy v0.0.5 to development by @devsjc #5

Workflow file for this run

name: Deploy DAGs
run-name: Deploy ${{ inputs.tag }} to ${{ inputs.deploy_target }} by @${{ github.actor }}
on:
workflow_dispatch:
inputs:
deploy_target:
required: true
description: 'The target environment to deploy to'
type: choice
options: ['development', 'production']
tag:
required: true
description: The repo tag to deploy
jobs:
deploy-dags:
runs-on: ubuntu-latest
environment: ${{ inputs.deploy_target }}
strategy:
matrix:
domain: [ "uk" ]
env:
BUCKET_NAME: "${{ matrix.domain }}-${{ inputs.deploy_target }}-eb-airflow"
DOMAIN: ${{ matrix.domain }}
REGION: "${{ matrix.domain == 'india' && 'ap-south-1' || 'eu-west-1' }}"
steps:
- name: Checkout required tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets[vars.KEY__AWS_ACCESS_KEY_ID] }}
aws-secret-access-key: ${{ secrets[vars.KEY__AWS_SECRET_ACCESS_KEY] }}
aws-region: ${{ env.REGION }}
- name: Create domain .airflowignore file
run: |
echo */ >> .airflowignore
echo !airflow_dags/dags/${DOMAIN} >> .airflowignore
- name: Deploy to S3 dagbag
run: |
aws s3 sync .airflowignore s3://$BUCKET_NAME/dags/.airflowignore
aws s3 sync src/airflow_dags s3://$BUCKET_NAME/dags/airflow_dags