mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-16 12:53:42 +00:00
feat(runner): add built-in actions framework with checkout (#871)
Adds built-in actions, native Go actions shipped with the runner and selected with `uses: builtin:<name>`. Jobs need no action download and no Node in their image. The first one is `builtin:checkout`, a subset of `actions/checkout` with `repository`, `ref`, `token`, `path` and `fetch-depth`. Other inputs fail the step. The runner clones shallowly on its host and copies the tree into the job, while `gitea-runner exec` copies the local working directory for the workflow's own ref. `actions/checkout` and other remote actions are unchanged. A clone ref of `HEAD` now shallow-clones the remote's default branch, which checkout uses for other repositories. --------- Co-authored-by: silverwind <[email protected]> Co-authored-by: silverwind <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/871 Reviewed-by: silverwind <[email protected]> Co-authored-by: bircni <[email protected]>
This commit is contained in:
1 parent
98816a605c
commit
7ad12038d1
12 files changed
+381
-13
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// Copyright 2026 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// Package action holds the native actions run by `uses: builtin:<name>`.
|
||||
package action
|
||||
|
||||
import (
|
||||
"gitea.com/gitea/runner/act/container"
|
||||
|
||||
"gitea.dev/actionslib/pkg/model"
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
Container container.ExecutionsEnvironment
|
||||
Github *model.GithubContext
|
||||
Inputs map[string]string
|
||||
HostWorkdir string
|
||||
Workspace string // HostWorkdir as seen inside Container
|
||||
BindWorkdir bool
|
||||
NoSkipCheckout bool
|
||||
UseGitIgnore bool
|
||||
InsecureSkipTLS bool
|
||||
}
|
||||
Reference in new issue
Block a user