Skip to content

Commit

Permalink
add tofu-validate
Browse files Browse the repository at this point in the history
  • Loading branch information
ashcherbatyi committed Jun 23, 2024
1 parent c944d4d commit 2996a03
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/terraform-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Terraform/OpenTofu Validate

on:
pull_request:
paths:
- 'tf-bootstrap/**'
- '.github/workflows/terraform-validate.yml'

jobs:

tofu:
name: 'OpenTofu'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tf-bootstrap

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup OpenTofu
uses: opentofu/setup-opentofu@v1
with:
tofu_version: '>1.6.0' # Specify your desired OpenTofu version

- name: OpenTofu Format
run: tofu fmt -check -recursive

- name: OpenTofu Init
run: tofu init

- name: OpenTofu Validate
run: tofu validate

0 comments on commit 2996a03

Please sign in to comment.