mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
feat: offline mode for new action cache (#2173)
* Try fetch update of the action, otherwise use cached version Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
d56e6c6683
commit
7065a7e228
2 changed files with 51 additions and 2 deletions
12
cmd/root.go
12
cmd/root.go
|
@ -617,8 +617,16 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
|
|||
ContainerNetworkMode: docker_container.NetworkMode(input.networkName),
|
||||
}
|
||||
if input.useNewActionCache {
|
||||
config.ActionCache = &runner.GoGitActionCache{
|
||||
Path: config.ActionCacheDir,
|
||||
if input.actionOfflineMode {
|
||||
config.ActionCache = &runner.GoGitActionCacheOfflineMode{
|
||||
Parent: runner.GoGitActionCache{
|
||||
Path: config.ActionCacheDir,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
config.ActionCache = &runner.GoGitActionCache{
|
||||
Path: config.ActionCacheDir,
|
||||
}
|
||||
}
|
||||
}
|
||||
r, err := runner.New(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue