Skip to content

add missing trigger ci reporting #9

add missing trigger ci reporting

add missing trigger ci reporting #9

Workflow file for this run

name: Build reporting infrastructure
on:
push:
branches: [ main ]
paths:
- 'reports/**'
- .github/workflows/reporting.yml
- aws/*
jobs:
build:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
- run: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 663234259711.dkr.ecr.us-east-1.amazonaws.com
- run: docker build -t "663234259711.dkr.ecr.us-east-1.amazonaws.com/hotkey/reporting:${GITHUB_SHA}" ./reports
- run: docker push "663234259711.dkr.ecr.us-east-1.amazonaws.com/hotkey/reporting:${GITHUB_SHA}"
terraform:
runs-on: ubuntu-latest
needs: build
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_db_password: ${{ secrets.DB_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v3
- run: |
cd aws
terraform init
terraform plan -var "github_sha=$GITHUB_SHA"
terraform apply -var "github_sha=$GITHUB_SHA" -auto-approve