changed-files: [BUG] Argument list too long with files input

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I’m using the latest release

Describe the bug?

A couple of thousands files matching the input filter is too long, causing the following error:

Error: An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/...'. Argument list too long

I believe it is happening at bash $GITHUB_ACTION_PATH/entrypoint.sh in the action.

To Reproduce

Run the action and match a lot of files.

      - uses: tj-actions/changed-files@v14.6
        with:
          files: **/*

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

The glob action could pass the patterns to changed-files as a temporary file instead of as an environment variable.

Relevant log output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 15 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@jacobrask @mosherc @genieai-vikas This should be resolved in the latest release.

I am also having this issue with this simple example:

        with:
          files: |
            src/scripts/**/*.js

Why is this issue closed if it’s still happening?