mirror of
https://github.com/sidpalas/devops-directive-terraform-course.git
synced 2025-12-11 13:21:14 +00:00
[bugfix] update condition to use event_name==release
This commit is contained in:
4
.github/workflows/terraform.yml
vendored
4
.github/workflows/terraform.yml
vendored
@@ -81,7 +81,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Terraform Apply Global
|
- name: Terraform Apply Global
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push' || github.event_name == 'release'
|
||||||
working-directory: 07-managing-multiple-environments/file-structure/global
|
working-directory: 07-managing-multiple-environments/file-structure/global
|
||||||
run: |
|
run: |
|
||||||
terraform init
|
terraform init
|
||||||
@@ -92,7 +92,7 @@ jobs:
|
|||||||
run: terraform apply -var db_pass=${{secrets.DB_PASS }} -auto-approve
|
run: terraform apply -var db_pass=${{secrets.DB_PASS }} -auto-approve
|
||||||
|
|
||||||
- name: Terraform Apply Production
|
- name: Terraform Apply Production
|
||||||
if: steps.check-tag.outputs.environment == 'production' && github.event_name == 'push'
|
if: steps.check-tag.outputs.environment == 'production' && github.event_name == 'release'
|
||||||
working-directory: 07-managing-multiple-environments/file-structure/production
|
working-directory: 07-managing-multiple-environments/file-structure/production
|
||||||
run: |
|
run: |
|
||||||
terraform init
|
terraform init
|
||||||
|
|||||||
Reference in New Issue
Block a user