tj-actions / changed-files

:octocat: Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
MIT License
1.79k stars 192 forks source link

[QUESTION] Files_ignore scope #2302

Closed tifennlegoff closed 3 days ago

tifennlegoff commented 5 days ago

Hi, I just have a question about settings for files_ignore, currently we're using the following configuration and the files_ignore looks to be ignored.

        id: changed-files
        uses: tj-actions/changed-files@v41.0.0
        with:
          dir_names: true
          files_yaml: |
            terraform:
              - '**/*.tf'
              - '**/*.jsonnet'
              - '**/*.libsonnet'
            jsonnet:
              - '**/*.jsonnet'
              - '**/*.libsonnet'
          files_ignore: |
              .github/**
              modules/**
              **/*module*/**

We use this output ${{ steps.changed-files.outputs.terraform_all_changed_files }} for another job and we see with the debug that there is a folder who should be ignored.

##[debug]Set output terraform_all_changed_and_modified_files = global/dashboards/staging global/dashboards/modules

There is a way to have files_ignore in this configuration? Actually I tried in this way but I still have the same behavior.

      - name: Changed Files
        id: changed-files
        uses: tj-actions/changed-files@v45.0.0
        with:
          dir_names: true
          files_yaml: |
            terraform:
              - '**/*.tf'
              - '**/*.jsonnet'
              - '**/*.libsonnet'
            jsonnet:
              - '**/*.jsonnet'
              - '**/*.libsonnet'
          files_ignore_yaml: |
            terraform:
              - '.github/**'
              - 'modules/**'
              - '**/*module*/**'
            jsonnet:
              - '.github/**'
              - 'modules/**'
              - '**/*module*/**'

Thanks

tj-actions-bot commented 5 days ago

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

jackton1 commented 4 days ago

Hi @tifennlegoff, your second approach is the solution but it appears there is a bug which results in the ignored files still being returned. A fix for this has been created and would be deployed momentarily.

tifennlegoff commented 3 days ago

Hi @jackton1, great, thanks!

jackton1 commented 2 days ago

@tifennlegoff this should be resolved in the latest release.