mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-05 14:55:44 +00:00
Adds `container.volumes`, mounted into every Docker job, service and action container. Sources are paths on the Docker daemon's host and need no `valid_volumes` entry, and workflow volumes may use them only with the same access. Adds `runner.ca_file`, a private CA trusted for the Gitea instance besides the system's by the runner's connections and its artifact proxy. Runner-side git and `builtin:checkout` use it as their CA bundle for the instance, persisted with the checkout's credentials. Jobs get it at `/var/run/act/ca.crt` with `NODE_EXTRA_CA_CERTS` pointing there unless the job or its image sets it. Git in jobs, as run by `actions/checkout`, needs the CA in the image's bundle, for example through `container.volumes`. Fixes: https://gitea.com/gitea/runner/issues/568 Fixes: https://gitea.com/gitea/runner/issues/671 Co-authored-by: silverwind <[email protected]> Co-authored-by: silverwind <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1366 Reviewed-by: silverwind <[email protected]> Co-authored-by: bircni <[email protected]>
28 lines
739 B
Go
28 lines
739 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
|
|
ClientCertFile string
|
|
ClientKeyFile string
|
|
CAFile string // the runner CA as seen inside Container
|
|
Env map[string]string
|
|
}
|