-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Workflow with on.push.paths triggers only on second push #26270
Comments
I was able to reproduce your problem and I'm trying to locate the bug. |
I found out why this problem occurs, when you push a new branch, Where the error occurred: gitea/modules/actions/workflows.go Lines 256 to 260 in 54c28fd
gitea/services/repository/push.go Lines 132 to 148 in 54c28fd
|
Fixes #26270. Co-Author: @wxiaoguang Thanks @lunny for providing this solution As #26270 (comment) said, at present we cannot get the names of changed files correctly when the `OldCommitID` is `EmptySHA`. In this PR, the `GetCommitFilesChanged` method is added and will be used to get the changed files by commit ID. References: - https://stackoverflow.com/a/424142 --------- Co-authored-by: wxiaoguang <[email protected]>
…26290) Fixes go-gitea#26270. Co-Author: @wxiaoguang Thanks @lunny for providing this solution As go-gitea#26270 (comment) said, at present we cannot get the names of changed files correctly when the `OldCommitID` is `EmptySHA`. In this PR, the `GetCommitFilesChanged` method is added and will be used to get the changed files by commit ID. References: - https://stackoverflow.com/a/424142 --------- Co-authored-by: wxiaoguang <[email protected]>
…26316) Backport #26290 by @Zettat123 Fixes #26270. Co-Author: @wxiaoguang Thanks @lunny for providing this solution As #26270 (comment) said, at present we cannot get the names of changed files correctly when the `OldCommitID` is `EmptySHA`. In this PR, the `GetCommitFilesChanged` method is added and will be used to get the changed files by commit ID. References: - https://stackoverflow.com/a/424142 Co-authored-by: Zettat123 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
Description
The following workflow configuration file should trigger on push events to any branch where files anywhere below
dir2/
got changed.With Gitea 1.20.2 and act runner 0.2.4 this works when pushing a commit that modifies files in
dir2/
and the branch already exists on the remote (e.g. the branchmain
).It does not work when a new commit that modifies files in
dir2
/ is pushed to a new branch on the remote. The event is silently ignored. However, the workflow triggers when pushing a second commit to the same branch.Gitea Version
1.20.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
git version 2.39.2
Operating System
Debian 12
How are you running Gitea?
Official release supervised by systemd.
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: