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] dir_names = true not returning directories with changed files #598

Closed
3 tasks done
discordianfish opened this issue Aug 24, 2022 · 5 comments · Fixed by #600
Closed
3 tasks done

[BUG] dir_names = true not returning directories with changed files #598

discordianfish opened this issue Aug 24, 2022 · 5 comments · Fixed by #600
Labels
bug Something isn't working

Comments

@discordianfish
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?

Using:

      - name: Get changed files
        id: changed-files
        with:
          files: dir

It correctly detects the following changed files:

dir/foo/script.py
dir/bar/script.py

But setting dir_names = true returns no changed files. Also tried dir_names = "true" without it making a difference.

To Reproduce

Should be reproducable using these steps:

      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Get changed files
        id: changed-files
        with:
          files: dir
          dir_names: "true"
        uses: tj-actions/changed-files@v29.0.0

and then modifying files in dir//file

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

I expect steps.changed-files.outputs.all_changed_files to be set to:

  • dir/foo
  • dir/bar

Relevant log output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@discordianfish discordianfish added the bug Something isn't working label Aug 24, 2022
@github-actions
Copy link
Contributor

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

@jackton1
Copy link
Member

jackton1 commented Aug 24, 2022

@discordianfish Have you tried using?

      - name: Get changed files
        uses: tj-actions/changed-files@v29.0.0
        id: changed-files
        with:
          files: dir/**
          dir_names: "true"

@arthurk
Copy link

arthurk commented Aug 25, 2022

I have the same problem since upgrading to v29.

      - name: Get changed helm chart files
        id: changed-files-helm
        uses: tj-actions/changed-files@v29.0.0
        with:
          base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
          dir_names: 'true'
          files: |
            helm-charts/**

It returns the correct files in v28, but none in v29

@jackton1
Copy link
Member

@arthurk @discordianfish This bug has been fixed in the latest patch release.

@arthurk
Copy link

arthurk commented Aug 26, 2022

thanks for the quick fix, everything works again

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.

3 participants