[CI] Forgejo Actions implementation .forgejo/workflows

This commit is contained in:
Loïc Dachary 2023-05-30 00:57:10 +02:00
parent 8af826a6f7
commit 8b11cab677
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -34,11 +34,14 @@ func IsWorkflow(path string) bool {
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) {
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 {
tree, err = commit.SubTree(".github/workflows")
}