From 3bbd72745e34249980c4e5403fc37cc099903b62 Mon Sep 17 00:00:00 2001 From: githubofkrishnadhas Date: Wed, 31 Jul 2024 02:51:03 +0530 Subject: [PATCH] terraform docs workflow DEVOPS-270 --- .github/workflows/terraform-docs.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/terraform-docs.yml diff --git a/.github/workflows/terraform-docs.yml b/.github/workflows/terraform-docs.yml new file mode 100644 index 0000000..4126352 --- /dev/null +++ b/.github/workflows/terraform-docs.yml @@ -0,0 +1,27 @@ +name: Generate terraform docs +on: + pull_request: + types: + - closed + branches: + - main + +permissions: + contents: write + +jobs: + generate-terraform-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Render terraform docs and push changes back to PR + uses: terraform-docs/gh-actions@main + with: + recursive: true + config-file: .terraform-docs.yml + output-file: README.md + output-method: inject + git-push: "true"