Skip to content

Commit

Permalink
generate tf doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sahassou committed Sep 3, 2023
1 parent 3430b6c commit 81ecb75
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/generate-tf-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# https://github.com/terraform-docs/gh-actions

name: Generate Terraform-Docs
on:
push:
branches:
- '*'
workflow_call:
inputs:
name:
description: "Name on which to push changes to GitHub"
required: true
type: string
email:
description: "Email on which to push changes to GitHub"
required: true
type: string
src_path_tf:
description: "Provide dir on which to run tf-docs"
required: false
type: string
terraform_docs_config_file:
description: "Name custom tf-docs template file if existing"
required: false
type: string

jobs:
create-tf-docs:
runs-on: ubuntu-latest
steps:
- name: Checking out code to Runner
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Render Terraform-Docs
uses: terraform-docs/[email protected]
with:
find-dir: ${{ inputs.src_path_tf}}
config-file: ${{ inputs.terraform_docs_config_file }}
output-file: README.md
# other methods "replace" or "reprint", "inject"
output-method: replace
git-push: true
git-commit-message: "Updating README.md via GithubActions (tf-docs)"
git-push-user-email: ${{ inputs.email }}
git-push-user-name: ${{ inputs.name }}

0 comments on commit 81ecb75

Please sign in to comment.