66 environment :
77 required : true
88 type : string
9- description : ' The environment to deploy to (e.g. nonprod, prod)'
10- default : ' nonprod'
9+ description : " The environment to deploy to (e.g. nonprod, prod)"
10+ default : " nonprod"
1111 branch :
1212 required : false
1313 type : string
1616 required : false
1717 type : string
1818 default : none
19- env :
20- GO_VERSION : 1.21.6
21- TERRAFORM_VERSION : 1.7.4
19+ go_version :
20+ required : false
21+ type : string
22+ default : " 1.21.6"
23+ terraform_version :
24+ required : false
25+ type : string
26+ default : " 1.7.4"
2227
2328jobs :
2429 TestAndBuild :
@@ -35,12 +40,12 @@ jobs:
3540 - name : Install Terraform
3641 uses : hashicorp/setup-terraform@v1
3742 with :
38- terraform_version : ${{ env.TERRAFORM_VERSION }}
43+ terraform_version : ${{ inputs.terraform_version }}
3944
4045 - name : Setup Go
4146 uses : actions/setup-go@v2
4247 with :
43- go-version : ${{ env.GO_VERSION }}
48+ go-version : ${{ inputs.go_version }}
4449
4550 - name : Set up Golang CI Tools
4651 run : ./scripts/install_ci.sh
@@ -102,7 +107,7 @@ jobs:
102107 - name : Set up the Go workspace
103108 uses : actions/setup-go@v2
104109 with :
105- go-version : ${{ env.GO_VERSION }}
110+ go-version : ${{ inputs.go_version }}
106111 go-path : ${{ github.workspace }}/gopath
107112 go-bin : ${{ github.workspace }}/gopath/bin
108113 - name : Download pipeline dependencies
@@ -171,7 +176,7 @@ jobs:
171176 - name : Install Terraform
172177 uses : hashicorp/setup-terraform@v1
173178 with :
174- terraform_version : ${{ env.TERRAFORM_VERSION }}
179+ terraform_version : ${{ inputs.terraform_version }}
175180
176181 # Configure the Terraform backend
177182 - name : Configure Terraform Backend
@@ -343,7 +348,7 @@ jobs:
343348 - name : Install Terraform
344349 uses : hashicorp/setup-terraform@v1
345350 with :
346- terraform_version : ${{ env.TERRAFORM_VERSION }}
351+ terraform_version : ${{ inputs.terraform_version }}
347352
348353 - name : Terraform destroy
349354 run : |
0 commit comments