Skip to content

Commit

Permalink
Initial terraform-fmt action
Browse files Browse the repository at this point in the history
  • Loading branch information
chrizkim committed Apr 21, 2021
1 parent 5d3a144 commit 2da3142
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions terraform-fmt/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Terraform Fmt
description: Checks Terraform formatting

inputs:
working_directory:
required: true

runs:
using: "composite"
steps:
- name: Check formatting
run: |
if terraform fmt -recursive -check -diff; then
echo 'No formatting issues found'
else
echo
echo 'Formatting issues found, run `terraform fmt` and re-commit'
fi
working-directory: ${{ inputs.working_directory }}
shell: bash

0 comments on commit 2da3142

Please # to comment.