Skip to content

How to exclude a folder in current working directory for TFDOCS #76

@vara-bonthu

Description

@vara-bonthu

What problem are you facing?

I am using this workflow to update Terraform Readme with Docs. My module contains number of folders under root including some examples.

My folder structure as follows. I would like to run this workflow only for modules folder and the root folder where main.tf file is located.

  |--designs
  |--examples
  |--modules
      |--mod1 
      |--mod2
  |--main.tf
  |--variables.tf

here is my workflow example

     - uses: actions/checkout@v2
        if: ${{ (github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'pull_request') }}
        with:
          fetch-depth: 0
          ref: ${{ github.event.pull_request.head.ref }}
          repository: ${{github.event.pull_request.head.repo.full_name}}

     - name: Render terraform docs inside the README.md and push changes back to PR branch
        uses: terraform-docs/gh-actions@v0.11.0
        if: github.event.pull_request.head.repo.full_name == github.repository
        with:
          find-dir: .
          output-file: README.md
          output-method: inject
          git-push: "true"

How could terraform-docs help solve your problem?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions