mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-04 14:35:32 +00:00
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]>
24 lines
590 B
Go
24 lines
590 B
Go
// 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
|
|
}
|