terraform apply based on branch name

This commit is contained in:
Jun-te Kim 2026-02-09 12:35:18 +00:00
parent 5001893490
commit 2881ecd287

View file

@ -27,6 +27,7 @@ on:
required: false
type: string
default: 'false'
# can only be 'true' or 'false'
secrets:
AWS_ACCESS_KEY_ID:
@ -92,6 +93,6 @@ jobs:
-out=lambdaplan
- name: Terraform Apply
if: inputs.terraform_apply == 'true' || inputs.stage == 'dev' || inputs.stage == 'main'
if: inputs.terraform_apply == 'true' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main'
working-directory: ${{ inputs.lambda_path }}
run: terraform apply -auto-approve lambdaplan