feat: make use new action cache the new default for downloading actions (#12)

* remove legacy action caching
* migrate tests
* clear old legacy action cache when run
This commit is contained in:
ChristopherHX
2025-01-26 13:19:25 +01:00
committed by GitHub
parent 3d684447a5
commit 5b4393f840
11 changed files with 152 additions and 282 deletions

View File

@@ -699,6 +699,9 @@ func (cr *containerReference) waitForCommand(ctx context.Context, isTerminal boo
}
func (cr *containerReference) CopyTarStream(ctx context.Context, destPath string, tarStream io.Reader) error {
if common.Dryrun(ctx) {
return nil
}
// Mkdir
buf := &bytes.Buffer{}
tw := tar.NewWriter(buf)

View File

@@ -62,6 +62,9 @@ func (e *HostEnvironment) Copy(destPath string, files ...*FileEntry) common.Exec
}
func (e *HostEnvironment) CopyTarStream(ctx context.Context, destPath string, tarStream io.Reader) error {
if common.Dryrun(ctx) {
return nil
}
if err := os.RemoveAll(destPath); err != nil {
return err
}