Skip to content

Commit

Permalink
terraform-lint: Simplify Terraform installation
Browse files Browse the repository at this point in the history
Simplify Terraform installation based on feedback
<#35 (comment)>

Follows GH Action docs to add to the system `PATH` via `GITHUB_PATH`
<https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path>
  • Loading branch information
joverlee521 committed Dec 16, 2024
1 parent 149737e commit b83227e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/terraform-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Install Terraform
run: >
wget -O - https://apt.releases.hashicorp.com/gpg
| sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
| sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform
run: |
wget -O terraform.zip https://releases.hashicorp.com/terraform/1.10.2/terraform_1.10.2_linux_amd64.zip
unzip terraform.zip -d "$HOME/terraform"
echo "$HOME/terraform" >> "$GITHUB_PATH"
- uses: actions/checkout@v4

Expand Down

0 comments on commit b83227e

Please sign in to comment.