From 2ea809fbaa3285e85e532926f9796c86748215d3 Mon Sep 17 00:00:00 2001 From: miladbeigi Date: Sat, 23 Mar 2024 10:25:27 -0400 Subject: [PATCH] feat(ci): add format check --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1e83666 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: Terraform + +on: + push: + branches: + - main + +jobs: + plan: + name: Format Terraform + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v1 + + - name: Run terraform fmt check + id: fmt + run: terraform fmt -check -diff -recursive . + + - name: Initialize Terraform + id: init + run: | + terraform init + + - name: Validate Terraform + id: validate + run: | + terraform validate \ No newline at end of file