-
-
Notifications
You must be signed in to change notification settings - Fork 196
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] Can't get all changed files after pushing new commit #639
[BUG] Can't get all changed files after pushing new commit #639
Comments
Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience. |
@okorepanov To achieve that you’ll need to use. name: CI
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Test changed-files
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v29
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done You can also checkout the examples for more information. The problem with why you only see changes between the last commit and the current commit is because you are running the workflow based on
This is counter intuitive because that’s the what using the
Hope this helps. Let me know if you have any other questions. |
@jackton1 Could you please explain how did this work before in v29 for pull requests, without the need to fetch the entire repo's history? |
@alpeb The fix has been deployed in the latest release. |
That's cool, thanks a lot! |
Is there an existing issue for this?
Does this issue exist in the latest version?
Describe the bug?
I want to get all changed files over entire PR after each push event (after adding new commit as well). But i always get changed files from the last commit only. I guess, that i am doing something wrong, so, could you please direct me in a right way
To Reproduce
name: Echo Pull Request
on:
push:
pull_request:
jobs:
echo:
runs-on: ubuntu-latest
name: Echo Changed Files
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
What OS are you seeing the problem on?
ubuntu-latest or ubuntu-20.04
Expected behavior?
Expect to iterate over all changed files in a PR
Relevant log output
No response
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: