Skip to content

Commit

Permalink
Improve tfenv installation and hopefully get the PATH right for the p…
Browse files Browse the repository at this point in the history
…roxied Terraform
  • Loading branch information
rquadling committed Dec 22, 2023
1 parent ea6da73 commit 7e90920
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,31 @@ jobs:
]
steps:
- uses: actions/checkout@v4
- run: git clone https://github.com/tfutils/tfenv.git ~/.tfenv
- run: echo ${{ matrix.terraform_version }} > .terraform-version
- run: cat .terraform-version
- run: ~/.tfenv/bin/tfenv install
- run: ~/.tfenv/bin/tfenv use ${{ matrix.terraform_version }}
- run: jq --version; aws --version; terraform --version
- run: tests/tests.sh

- name: Set up tfenv
run: |
git clone https://github.com/tfutils/tfenv.git ~/.tfenv
echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> $HOME/.bashrc
echo 'eval "$(tfenv init -)"' >> $HOME/.bashrc
source $HOME/.bashrc
- name: Install Terraform
run: |
echo ${{ matrix.terraform_version }} > .terraform-version
cat .terraform-version
~/.tfenv/bin/tfenv install ${{ matrix.terraform_version }}
~/.tfenv/bin/tfenv use ${{ matrix.terraform_version }}
- name: Validate versions
run: |
jq --version
aws --version
tfenv --version
terraform --version
- name: Run tests
run: |
tests/tests.sh
- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down

0 comments on commit 7e90920

Please sign in to comment.