Skip to content

Commit

Permalink
ci: add terraform-docs to ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dstrates committed Jan 6, 2025
1 parent 985a359 commit 1ea8a6c
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 120 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ jobs:
name: Terraform CI
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- uses: hashicorp/setup-terraform@v3

- name: Terraform fmt
- name: Terraform Format
id: fmt
run: terraform fmt -check
continue-on-error: true
Expand All @@ -38,3 +42,11 @@ jobs:
- name: Terraform Validate
id: validate
run: terraform validate -no-color

- name: Terraform Docs
uses: terraform-docs/[email protected]
with:
working-dir: .
output-file: README.md
output-method: print
fail-on-diff: true
Loading

0 comments on commit 1ea8a6c

Please sign in to comment.