Merge pull request #12 from thodson-usgs/add-validate-action #1
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: Validate Terraform | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
validate-terraform: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Terraform repo | |
uses: actions/checkout@v3 | |
- name: Configure local backend | |
run: | | |
cp ci/backend_override.tf terraform/aws/ | |
# Install the selected version of Terraform CLI | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v2 | |
#with: | |
# terraform_version: ${{ secrets.TERRAFORM_VERSION }} | |
- name: Validate AWS runner | |
id: validate | |
working-directory: ./terraform/aws | |
run: | | |
terraform init -input=false | |
terraform validate |