Skip to content

Commit

Permalink
add matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
aplybeah committed Apr 11, 2024
1 parent d95f651 commit 0c6c73d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/cd-analytics-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ name: Deploy Analytics Infra
on:
push:
branches:
- main
# - alsia/create-infra-deploy-files -> testing branch
# - main
- alsia/create-infra-deploy-files
paths:
- "infra/analytics/**"

jobs:
deploy-infra:
name: Deploy Infrastructure
runs-on: ubuntu-latest
strategy:
matrix:
directory: ["build-repository","database", "service"]
envs: [ "dev"]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,10 +34,11 @@ jobs:
environment: dev # for testing; will move to staging and prod

- name: Terraform Init and Apply
run: |
./bin/teraform-init-and-apply.sh
run: |
./bin/terraform-init.sh infra/analytics/${{ matrix.directory }} ${{ matrix.envs }}
# ./bin/teraform-init-and-apply.sh # commented for testing. This script runs terraform init and apply
# TF_CLI_ARGS="-input=false -auto-approve" # skips confirmation prompt in the pipeline; commented for testing

# this script needs the backend config name (the environment name) and the module location (e.g. infra/{app}/**)

# extract path that contains changes somehow?
# make matrix for staging and prod

0 comments on commit 0c6c73d

Please sign in to comment.