diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index a883f4181..382338c95 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -40,11 +40,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") }