Merge pull request #292 from willroberts/update-docs #120
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: lint_terraform | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- terraform/**.tf | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out code | |
uses: actions/checkout@v3 | |
- name: install terraform | |
run: | | |
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg | |
echo "deb [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=1.3.0 | |
- name: install tflint | |
run: curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash | |
- name: lint terraform code | |
run: scripts/tflint.sh |