trilom / file-changes-action

This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.
MIT License
167 stars 48 forks source link

Unable to retrieve changed files on a "push" event ("pull_request" works though) #103

Open irasnyd opened 4 years ago

irasnyd commented 4 years ago

Describe the bug

I have a workflow which uses this action (version 1.2.3, since version 1.2.4 doesn't work for me, see Issue #102).

My workflow triggers on both push and pull_request. However, the push triggered workflow run always fails, while the pull_request triggered workflow run works correctly. It runs the same exact workflow for both triggers, however the file-changes-action step fails when running the push trigger. I have attached the logs.

Workflow See attached syntaxcheck.zip

Expected behavior

The file-changes-action should work for push triggered workflows.

Additional context

Here are the logs from a "push + pull_request" triggered run.

Thank you for this project! When it works, it works great! I really appreciate you making it available for us to use.

thoellrich commented 4 years ago

@irasnyd - I see the exact same error here for push when a branch is pushed the first time. In that case there is no previous sha to compare to and it defaults to 0000...., which causes the error we are seeing.