Skip to content

Commit

Permalink
Fix custom setup-terraform usage in template-only-ci-infra.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
doshitan committed Dec 24, 2024
1 parent 68a122d commit 7fb0495
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/actions/setup-terraform/action.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/template-only-ci-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7fb0495

Please sign in to comment.