Skip to content

Commit 185c491

Browse files
authored
Merge pull request #4 from chris-qa-org/add-github-action-to-generate-terraform-docs
Add GitHub action to generate Terraform docs
2 parents 1c39a93 + e5d968d commit 185c491

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,19 @@ jobs:
4040
with:
4141
entrypoint: terraform
4242
args: fmt -check=true -diff=true
43+
generate-terraform-docs:
44+
needs: validate
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Check out code
48+
uses: actions/checkout@v2
49+
with:
50+
ref: ${{ github.event.pull_request.head.ref }}
51+
52+
- name: Generate Terraform docs
53+
uses: terraform-docs/[email protected]
54+
with:
55+
working-dir: .
56+
config-file: .terraform-docs.yml
57+
git-push: true
58+
git-commit-message: "GitHub Action: Generate terraform docs"

USAGE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Usage
2+
3+
<!--- BEGIN_TF_DOCS --->
4+
README.md updated successfully
5+
6+
<!--- END_TF_DOCS --->
7+

0 commit comments

Comments
 (0)