From c84eea711b4a5949e25fcd9dfc80a2c4a25d410e Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Wed, 11 May 2022 21:14:45 +0200 Subject: [PATCH] fix: panic while running DRYRUN with local actions (#1141) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- act/container/docker_run.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/act/container/docker_run.go b/act/container/docker_run.go index 1948c317..0bd67116 100644 --- a/act/container/docker_run.go +++ b/act/container/docker_run.go @@ -162,6 +162,9 @@ func (cr *containerReference) CopyDir(destPath string, srcPath string, useGitIgn } func (cr *containerReference) GetContainerArchive(ctx context.Context, srcPath string) (io.ReadCloser, error) { + if common.Dryrun(ctx) { + return nil, fmt.Errorf("DRYRUN is not supported in GetContainerArchive") + } a, _, err := cr.cli.CopyFromContainer(ctx, cr.id, srcPath) return a, err }