mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
add tf workspace
This commit is contained in:
parent
6594c3fa1e
commit
afd1973499
1 changed files with 6 additions and 6 deletions
12
.github/workflows/deploy_terraform.yml
vendored
12
.github/workflows/deploy_terraform.yml
vendored
|
|
@ -46,16 +46,16 @@ jobs:
|
|||
- name: Terraform Init
|
||||
run: cd infrastructure/terraform && terraform init
|
||||
|
||||
# - name: Terraform Workspace
|
||||
# run: |
|
||||
# BRANCH_NAME=$(echo "${{ github.ref }}" | sed -e "s/^refs\/heads\///")
|
||||
# cd infrastructure/terraform
|
||||
# terraform workspace select ${BRANCH_NAME} || terraform workspace new ${BRANCH_NAME}
|
||||
- name: Terraform Workspace
|
||||
run: |
|
||||
BRANCH_NAME=$(echo "${{ github.ref }}" | sed -e "s/^refs\/heads\///")
|
||||
cd infrastructure/terraform
|
||||
terraform workspace select ${BRANCH_NAME} || terraform workspace new ${BRANCH_NAME}
|
||||
|
||||
- name: Terraform Plan
|
||||
run: |
|
||||
BRANCH_NAME=$(echo "${{ github.ref }}" | sed -e "s/^refs\/heads\///")
|
||||
cd infrastructure/terraform && terraform plan -var-file=dev.tfvars
|
||||
cd infrastructure/terraform && terraform plan -var-file=${BRANCH_NAME}.tfvars
|
||||
|
||||
# - name: Deploy to Dev
|
||||
# if: github.ref == 'refs/heads/dev'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue