Build Infra #48
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: Build Infra | ||
on: | ||
# When a PR is created targeting master branch | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- "infrastructure/**" | ||
# Manual trigger via GH Actions UI | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: "Select target environment" | ||
required: true | ||
default: "dev" | ||
type: choice | ||
options: | ||
- dev | ||
- test | ||
- prod | ||
run_initial: | ||
description: "Run initial Terraform setup?" | ||
required: false | ||
default: "No" | ||
type: choice | ||
options: | ||
- "No" | ||
- "Yes" | ||
jobs: | ||
initial: | ||
if: ${{ inputs.run_initial == 'Yes' }} | ||
outputs: | ||
job_status: ${{ job.status }} | ||
uses: ./.github/workflows/aws-template-terraform.yml | ||
Check failure on line 37 in .github/workflows/build-infra.yml GitHub Actions / Build InfraInvalid workflow file
|
||
with: | ||
CONTEXT_FOLDER: "./infrastructure/cloud/environments/initial" | ||
CHANGE_FOLDER_NAME: environments/${{ inputs.environment }} | ||
ENVIRONMENT_NAME: ${{ inputs.environment || 'dev' }} | ||
APPLY_TF_CODE: false | ||
secrets: inherit | ||
build: | ||
needs: [initial] | ||
if: ${{ inputs.run_initial == 'No' || needs.initial.outputs.job_status == 'success' }} | ||
uses: ./.github/workflows/aws-template-terraform.yml | ||
with: | ||
CONTEXT_FOLDER: "./infrastructure/cloud/environments/${{ inputs.environment || 'dev' }}" | ||
CHANGE_FOLDER_NAME: environments/${{ inputs.environment || 'dev' }} | ||
ENVIRONMENT_NAME: ${{ inputs.environment || 'dev' }} | ||
APPLY_TF_CODE: false | ||
secrets: inherit |