Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] files input with directories not working as expected #1194

Closed
3 tasks done
florianbuth-sympower opened this issue May 29, 2023 · 3 comments · Fixed by #1197
Closed
3 tasks done

[BUG] files input with directories not working as expected #1194

florianbuth-sympower opened this issue May 29, 2023 · 3 comments · Fixed by #1197
Labels
bug Something isn't working

Comments

@florianbuth-sympower
Copy link

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?

Up to v35 it was possible to specify directories to check for changed files without adding a glob pattern at the end. Now this seems to be required, but I am not sure if this is desired behaviour or accidental bug since README says it should be possible without glob pattern:

files: docs/*.{js,html}  # Alternatively using: `docs/**` or `docs`

To Reproduce

Using the following steps:

      - name: Get changed files
        id: changes
        uses: tj-actions/changed-files@v36
        with:
          files: |
            .github/workflows

      - name: Set files changed flag
        if: steps.changes.outputs.any_changed == 'true'
        id: changeset
        run: echo "run_job=true" >> $GITHUB_OUTPUT

Make any changes in a workflow file. Second step gets skipped. Adding the glob pattern at the end (.github/workflows/**) makes it work again. Alternatively, change version to v35 and it also works again.

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

The changed files in a directory should be recognized again without explicitly adding the glob pattern at the end. Alternatively, the README could be clearer to bring out that this is required now.

Relevant log output

Run tj-actions/changed-files@v36
  with:
    files: .github/workflows
  
    separator:  
    include_all_old_new_renamed_files: false
    old_new_separator: ,
    old_new_files_separator:  
    files_from_source_file_separator: 
  
    files_separator: 
  
    files_ignore_separator: 
  
    files_ignore_from_source_file_separator: 
  
    path: .
    quotepath: true
    diff_relative: true
    dir_names: false
    dir_names_exclude_root: false
    json: false
    escape_json: true
    fetch_depth: 50
    since_last_remote_commit: false
    write_output_files: false
    output_dir: .github/outputs

...

##[debug]Node Action run completed with exit code 0
##[debug]Set output added_files = 
##[debug]Set output copied_files = 
##[debug]Set output modified_files = 
##[debug]Set output renamed_files = 
##[debug]Set output type_changed_files = 
##[debug]Set output unmerged_files = 
##[debug]Set output unknown_files = 
##[debug]Set output all_changed_and_modified_files = 
##[debug]Set output all_changed_files = 
##[debug]Set output any_changed = false
##[debug]Set output only_changed = false
##[debug]Set output other_changed_files = .github/workflows/reusable.frontend.check-changes.yml
##[debug]Set output all_modified_files = 
##[debug]Set output any_modified = false
##[debug]Set output only_modified = false
##[debug]Set output other_modified_files = .github/workflows/reusable.frontend.check-changes.yml
##[debug]Set output deleted_files = 
##[debug]Set output any_deleted = false
##[debug]Set output only_deleted = false
##[debug]Set output other_deleted_files = 
##[debug]Finishing: Get changed files for frontend

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@florianbuth-sympower florianbuth-sympower added the bug Something isn't working label May 29, 2023
@github-actions
Copy link
Contributor

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 jackton1 linked a pull request May 29, 2023 that will close this issue
@jackton1
Copy link
Member

@florianbuth-sympower This should be resolved now.

@florianbuth-sympower
Copy link
Author

Indeed, now it is working again. Thank you so much for your quick action!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants