diff --git a/.github/actions/setup-terraform/action.yml b/.github/actions/setup-terraform/action.yml index cd09f02d..80d17aef 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 967e03b6..9c77738f 100644 --- a/.github/workflows/template-only-ci-infra.yml +++ b/.github/workflows/template-only-ci-infra.yml @@ -38,7 +38,9 @@ jobs: path: template-infra - name: Set up Terraform - uses: ./.github/actions/setup-terraform + uses: ./template-infra/.github/actions/setup-terraform + with: + version-file: ./template-infra/.terraform-version - uses: actions/setup-go@v5 with: