File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 11name : ' Terraform and TFLint PR Commenter'
22description : ' Adds opinionated comments to a PR from Terraform fmt/init/plan/validate/tflint output'
3- author : ' Rob Burger '
3+ author : ' GetTerminus '
44branding :
55 icon : ' git-pull-request'
66 color : ' blue'
@@ -20,22 +20,32 @@ inputs:
2020 terraform_version :
2121 description : ' The version of terraform from the workflow.'
2222 required : false
23- default : " 1.4.6"
23+ default : ' 1.4.6'
2424 use_beta_version :
2525 description : ' Whether to use the beta version of the commenter'
2626 required : false
2727 default : ' false'
2828runs :
2929 using : " composite"
3030 steps :
31+ - name : Set Terraform Version if inputs.terraform_version is Empty # Until https://github.com/actions/runner/issues/924 is fixed
32+ id : tf_version
33+ run : |
34+ if [[ -z ${{ inputs.terraform_version }} ]]; then
35+ echo "version=1.4.6" >> $GITHUB_OUTPUT
36+ else
37+ echo "version=${{ inputs.terraform_version }}" >> $GITHUB_OUTPUT
38+ fi
39+ shell : bash
3140 - name : Build commenter docker image (master)
3241 if : ${{ inputs.use_beta_version != 'true' }}
33- run : docker build --build-arg TERRAFORM_VERSION=${{ inputs.terraform_version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3
42+ run : docker build --build-arg TERRAFORM_VERSION=${{ steps.tf_version.outputs.version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3
3443 shell : bash
3544 - name : Build commenter docker image (beta)
3645 if : ${{ inputs.use_beta_version == 'true' }}
3746 # append branch with a pound (#) if developing. e.g., `commenter.git#my-branch`
38- run : docker build --build-arg TERRAFORM_VERSION=${{ inputs.terraform_version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3-beta
47+ run : |
48+ docker build --build-arg TERRAFORM_VERSION=${{ steps.tf_version.outputs.version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3-beta
3949 shell : bash
4050 - name : Run commenter image (plan)
4151 if : ${{ inputs.commenter_type == 'plan' }}
You can’t perform that action at this time.
0 commit comments