From e01d65f257f5305bbb0246090c7286fe2834d41d Mon Sep 17 00:00:00 2001 From: dreinhardt-terminus Date: Mon, 26 Jun 2023 14:12:29 -0400 Subject: [PATCH] fix: default version (https://github.com/actions/runner/issues/924) --- action.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 8fd23e4..ffd311d 100644 --- a/action.yml +++ b/action.yml @@ -28,14 +28,18 @@ inputs: runs: using: "composite" steps: - - run: | - echo "test" - echo "${{ inputs.terraform_version }}" - echo "${{ inputs.use_beta_version }}" + - name: Set Terraform Version if inputs.terraform_version is Empty # Until https://github.com/actions/runner/issues/924 is fixed + id: tf_version + run: | + if [[ -z ${{ inputs.terraform_version }} ]]; then + echo "version=1.4.6" >> $GITHUB_OUTPUT + else + echo "version=${{ inputs.terraform_version }}" >> $GITHUB_OUTPUT + fi shell: bash - name: Build commenter docker image (master) if: ${{ inputs.use_beta_version != 'true' }} - run: docker build --build-arg TERRAFORM_VERSION=${{ inputs.terraform_version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3 + run: docker build --build-arg TERRAFORM_VERSION=${{ steps.tf_version.outputs.version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3 shell: bash - name: Build commenter docker image (beta) if: ${{ inputs.use_beta_version == 'true' }} @@ -44,7 +48,7 @@ runs: echo "test" echo "${{ inputs.terraform_version }}" echo "${{ inputs.use_beta_version }}" - docker build --build-arg TERRAFORM_VERSION=${{ inputs.terraform_version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#dpr-fix-default-version + docker build --build-arg TERRAFORM_VERSION=${{ steps.tf_version.outputs.version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#dpr-fix-default-version shell: bash - name: Run commenter image (plan) if: ${{ inputs.commenter_type == 'plan' }}