Skip to content

add veda-ingest-ui similar to programmatic-client #56

add veda-ingest-ui similar to programmatic-client

add veda-ingest-ui similar to programmatic-client #56

Workflow file for this run

name: Pull Request - Preview CDK Diff
permissions:
id-token: write
contents: read
on: [pull_request]
jobs:
define-environment:
name: Set ✨ environment ✨ based on the branch 🌳
runs-on: ubuntu-latest
steps:
- name: Set the environment
id: define_environment
run: |
if [ "${{ github.base_ref }}" == "main" ]; then
echo "env_name=staging" >> $GITHUB_OUTPUT
echo "secret_name=veda-auth-staging-env" >> $GITHUB_OUTPUT
elif [ "${{ github.base_ref }}" == "dev" ]; then
echo "env_name=dev" >> $GITHUB_OUTPUT
echo "secret_name=veda-auth-dev-env" >> $GITHUB_OUTPUT
fi
- name: Print the environment
run: echo "The environment is ${{ steps.define_environment.outputs.env_name }}"
outputs:
env_name: ${{ steps.define_environment.outputs.env_name }}
secret_name: ${{ steps.define_environment.outputs.secret_name }}
predeploy:
name: Pre-deploy cdk diff for ${{ needs.define-environment.outputs.env_name }} 🚀
needs: [define-environment]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Configure awscli
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install CDK
run: npm install -g aws-cdk@2
- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
- name: Install python dependencies
run: |
pip install -r requirements.txt
- name: Get environment configuration for target branch
run: |
./scripts/get-env.sh ${{ needs.define-environment.outputs.secret_name }}
- name: Pre deployment CDK diff
run: |
echo $STAGE
cdk diff --outputs-file ${HOME}/cdk-outputs.json