mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 15:20:29 +00:00
fix(exec): load local reusable workflows from disk with --no-skip-checkout (#1362)
`gitea-runner exec --no-skip-checkout` panics with a nil pointer dereference on any job that calls a local reusable workflow (`uses: ./.gitea/workflows/x.yml`). Fetching a local reusable workflow from the instance was gated on `NoSkipCheckout`, but it reads the repository and SHA from the task's preset context, which only the daemon has. `exec` always has the workflow on disk, so the fetch is now gated on the preset instead, and `--no-skip-checkout` only governs checkout again. Daemon behavior is unchanged. The `exec` e2e test now also runs the existing reusable caller/callee pair with `--no-skip-checkout`. Reviewed-on: https://gitea.com/gitea/runner/pulls/1362 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
1 parent
261ab374ce
commit
f4741df90d
4 files changed
+27
-15
No files matched your search
@@ -30,7 +30,7 @@ func TestCompatibility(t *testing.T) {
|
||||
t.Run("cancellation_and_log_streaming", testRunCancellation)
|
||||
t.Run("dispatch", testWorkflowDispatch)
|
||||
t.Run("builtin_checkout", testBuiltinCheckout)
|
||||
t.Run("exec_artifacts", testExecArtifacts)
|
||||
t.Run("exec", testExec)
|
||||
t.Run("moving_action_ref", testMovingActionRef)
|
||||
t.Run("ephemeral", testEphemeralRunner)
|
||||
t.Run("failure_paths", testFailurePaths)
|
||||
|
||||
Reference in new issue
Block a user