mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-25 11:16:11 +01:00
[CI] Search .forgejo/workflows first
(cherry picked from commit8b11cab677
) (cherry picked from commitbe59270696
)
This commit is contained in:
parent
a4050eb6b1
commit
e068f8b191
|
@ -34,11 +34,14 @@ func IsWorkflow(path string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return strings.HasPrefix(path, ".gitea/workflows") || strings.HasPrefix(path, ".github/workflows")
|
return strings.HasPrefix(path, ".forgejo/workflows") || strings.HasPrefix(path, ".gitea/workflows") || strings.HasPrefix(path, ".github/workflows")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ListWorkflows(commit *git.Commit) (git.Entries, error) {
|
func ListWorkflows(commit *git.Commit) (git.Entries, error) {
|
||||||
tree, err := commit.SubTree(".gitea/workflows")
|
tree, err := commit.SubTree(".forgejo/workflows")
|
||||||
|
if _, ok := err.(git.ErrNotExist); ok {
|
||||||
|
tree, err = commit.SubTree(".gitea/workflows")
|
||||||
|
}
|
||||||
if _, ok := err.(git.ErrNotExist); ok {
|
if _, ok := err.(git.ErrNotExist); ok {
|
||||||
tree, err = commit.SubTree(".github/workflows")
|
tree, err = commit.SubTree(".github/workflows")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue