diff --git a/.github/actions/setup-terraform/action.yml b/.github/actions/setup-terraform/action.yml index cd09f02d1..80d17aef7 100644 --- a/.github/actions/setup-terraform/action.yml +++ b/.github/actions/setup-terraform/action.yml @@ -1,12 +1,16 @@ -name: 'Set up Terraform' -description: 'Set up Terraform with the version stored in the .terraform-version file' +name: "Set up Terraform" +description: "Set up Terraform with the version stored in the .terraform-version file" +inputs: + version-file: + description: "File containing the terraform version to use." + default: ".terraform-version" runs: using: "composite" steps: - - name: Get .terraform-version + - name: Get Terraform version id: get-terraform-version run: | - terraform_version="$(cat .terraform-version)" + terraform_version="$(cat ${{ inputs.version-file }})" echo "Terraform version: ${terraform_version}" echo "terraform_version=${terraform_version}" >> "$GITHUB_OUTPUT" shell: bash diff --git a/.github/workflows/template-only-ci-infra.yml b/.github/workflows/template-only-ci-infra.yml index 967e03b60..d7161ef8d 100644 --- a/.github/workflows/template-only-ci-infra.yml +++ b/.github/workflows/template-only-ci-infra.yml @@ -39,6 +39,8 @@ jobs: - name: Set up Terraform uses: ./.github/actions/setup-terraform + with: + version-file: ./template-infra/.terraform-version - uses: actions/setup-go@v5 with: