Use GITHUB_PATH file #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
terraform_version: [ | |
1.6.6, | |
1.5.7, | |
1.4.7, | |
1.3.10, | |
1.2.9, | |
1.1.9, | |
1.0.11, | |
0.15.5, | |
0.14.11, | |
0.13.7, | |
0.12.31, | |
0.11.15, | |
0.10.8, | |
0.9.11, | |
0.8.8, | |
0.7.13, | |
0.6.16, | |
0.5.3, | |
0.4.2, | |
0.3.7, | |
0.2.2, | |
0.1.1 | |
] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up tfenv | |
run: | | |
git clone https://github.com/tfutils/tfenv.git $HOME/.tfenv | |
echo "$HOME/.tfenv" >> $GITHUB_PATH | |
which -a aws jq tfenv terraform | |
- name: Install Terraform | |
run: | | |
echo ${{ matrix.terraform_version }} > .terraform-version | |
cat .terraform-version | |
tfenv install ${{ matrix.terraform_version }} | |
tfenv use ${{ matrix.terraform_version }} | |
- name: Validate versions | |
run: | | |
jq --version | |
aws --version | |
tfenv --version | |
terraform --version | |
- name: Run tests | |
run: | | |
which -a aws jq tfenv terraform | |
tfenv --version | |
terraform --version | |
tests/tests.sh | |
- name: Capture logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: logs-${{ matrix.terraform_version }} | |
path: test-reports/**/* |