Skip to content

Bump actions/checkout from 3 to 4 #138

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #138

Workflow file for this run

name: Example CI
on:
push:
paths:
- 'example/**'
- .github/workflows/example.yml
pull_request:
paths:
- 'example/**'
- .github/workflows/example.yml
workflow_dispatch:
jobs:
validate-terraform:
strategy:
matrix:
target: [vault]
name: Check module ${{ matrix.target }}
runs-on: ubuntu-22.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/[email protected]
with:
terraform_version: 1.0.8
- name: Validate ${{ matrix.target }} modules
run: |
for module in $(find . -maxdepth 1 -mindepth 1 -type d); do
pushd $module > /dev/null
pwd
terraform init
terraform fmt --recursive -check=true
terraform validate
popd > /dev/null
done
working-directory: example/${{ matrix.target }}/modules
- name: Validate ${{ matrix.target }} environments
run: |
for env in $(find . -maxdepth 1 -mindepth 1 -type d); do
pushd $env > /dev/null
pwd
terraform init -backend=false
terraform fmt --recursive -check=true
terraform validate
popd > /dev/null
done
working-directory: example/${{ matrix.target }}/environments