theappnest / terraform-monorepo-action

A GitHub action to return an array of paths to Terraform modules.
12 stars 14 forks source link

Ignore block not working #254

Open carjessu-trm opened 1 year ago

carjessu-trm commented 1 year ago

When using the latest release:

jobs:
  modules:
    runs-on: ubuntu-latest
    steps:
      - uses: theappnest/terraform-monorepo-action@master
        id: modules
        with:
          mode: all
          ignore: |
            */*
            !**/bootstrap/
    outputs:
      modules: ${{ steps.modules.outputs.modules }}

We are attempting to only use folders called bootstrap. An example of the file-structure as follows:

.
├── README.md
├── bootstrap
│   └── main.tf
└── gcp
    ├── folders
    │  ├── project
    │  │  │  └── bootstrap
    │  │  │  │   └── main.tf
    │  │  │  └── not-bootstrap
    │  │  │      └── main.tf

This results in the module only finding the root level bootstrap folder. When removing the ignore block, the action does correctly find all the modules specified in our repository. Given that this project seems to use https://www.npmjs.com/package/ignore, it should simply just work. Anything we can test to make this work for our use case?

pabloleonardo commented 1 year ago

I'm seeing the same behavior.

ego93 commented 6 days ago

I'm having the same issue, Do you have any word on a fix for this or anyone else tried a fix that works?