You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I deploy branch1 to master, then immediately deploy branch2 to master.
Both deployments have GHA functionality where they check for file changes using this GHA changed-files functionality.
I have set fetch-depth: 0
Observations:
This runs fine when just 1 branch is deployed to master at a time.
When I rerun failed job manually - it fails again consistently.
this library is trying to get changed file names between
Pushed commit: commit that triggered this workflow on gha
2nd commit from head of the branch.
Since I immediately push another commit to dev branch before this first commits workflow to check file-changed starts - we see that both SHA are same for git diff
git diff commit_2 commit_2
Hence we get this error.
To Reproduce
Create branch1 from master.
Then create branch2 from master.
Add some unique changes to both branches.
Write some GHA code job as below:
jobs:
seed_data_changed:
name: Check if seed data files changed
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all history of all branches
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v31
What OS are you seeing the problem on?
ubuntu-latest or ubuntu-20.04
Expected behavior?
No error should be shown.
We should see file changes as usual.
Relevant log output
No response
Anything else?
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Does this issue exist in the latest version?
Describe the bug?
I deploy branch1 to master, then immediately deploy branch2 to master.
Both deployments have GHA functionality where they check for file changes using this GHA changed-files functionality.
I have set
fetch-depth: 0
Observations:
Hence we get this error.
To Reproduce
Create branch1 from master.
Then create branch2 from master.
Add some unique changes to both branches.
Write some GHA code job as below:
What OS are you seeing the problem on?
ubuntu-latest or ubuntu-20.04
Expected behavior?
No error should be shown.
We should see file changes as usual.
Relevant log output
No response
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: