mirror of
https://gitea.com/gitea/runner.git
synced 2026-08-25 21:37:45 +00:00
enhance: download each action repository once per job (#1178)
A job downloads each action repository once, keyed on the clone URL and ref, so repeated `uses:` and different paths of one repository share a checkout. The download is reported once as `{org}/{repo}@{ref}`, the way actions/runner reports it.
The action itself is still read per step, because a repository without an action file gets a synthetic action built from that step's `with.args`.
Fixes https://gitea.com/gitea/runner/issues/1159
---------
Co-authored-by: silverwind <me@silverwind.io>
Reviewed-on: https://gitea.com/gitea/runner/pulls/1178
Reviewed-by: bircni <bircni@icloud.com>
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -118,7 +118,7 @@ func patchedAction(t *testing.T, repo, ref, entrypoint string) string {
|
||||
dir := tempDirPath(t)
|
||||
script := filepath.Join(dir, filepath.Base(entrypoint))
|
||||
require.NoError(t, os.WriteFile(script, body, 0o600))
|
||||
patchToolkit(t.Context(), dir, []string{script})
|
||||
patchToolkit(t.Context(), dir, dir, []string{script})
|
||||
return script
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user