Skip to content

Commit e6a9756

Browse files
feat: add functionality to conditionally create environment If no environment is passed, no environment will be created. (#188)
Co-authored-by: CloudDrove CI <[email protected]>
1 parent 770b422 commit e6a9756

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/terraform_workflow.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ on:
6666
type: string
6767
default: true
6868
description: 'If true, the action will securely generate a credentials file which can be used for authentication via gcloud and Google Cloud SDKs.'
69+
target_environment:
70+
description: "Name of the deployment environment (e.g., dev, staging, prod). Leave empty if no environment-specific context is needed."
71+
required: false
72+
type: string
73+
default: ""
6974
secrets:
7075
AZURE_CREDENTIALS:
7176
required: false
@@ -101,6 +106,8 @@ on:
101106
jobs:
102107
terraform-workflow:
103108
runs-on: ubuntu-latest
109+
environment: ${{ inputs.target_environment }}
110+
104111
outputs:
105112
tfplanExitCode: ${{ steps.tf-plan.outputs.exitcode }}
106113

0 commit comments

Comments
 (0)