summaryrefslogtreecommitdiffstats
path: root/pkg/container/docker_stub.go
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-20 23:07:42 +0200
committerDaniel Baumann <daniel@debian.org>2024-11-09 15:38:42 +0100
commit714c83b2736d7e308bc33c49057952490eb98be2 (patch)
tree1d9ba7035798368569cd49056f4d596efc908cd8 /pkg/container/docker_stub.go
parentInitial commit. (diff)
downloadforgejo-act-714c83b2736d7e308bc33c49057952490eb98be2.tar.xz
forgejo-act-714c83b2736d7e308bc33c49057952490eb98be2.zip
Adding upstream version 1.21.4.HEADupstream/1.21.4upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'pkg/container/docker_stub.go')
-rw-r--r--pkg/container/docker_stub.go69
1 files changed, 69 insertions, 0 deletions
diff --git a/pkg/container/docker_stub.go b/pkg/container/docker_stub.go
new file mode 100644
index 0000000..155d5ab
--- /dev/null
+++ b/pkg/container/docker_stub.go
@@ -0,0 +1,69 @@
+//go:build WITHOUT_DOCKER || !(linux || darwin || windows || netbsd)
+
+package container
+
+import (
+ "context"
+ "runtime"
+
+ "github.com/docker/docker/api/types"
+ "github.com/nektos/act/pkg/common"
+ "github.com/pkg/errors"
+)
+
+// ImageExistsLocally returns a boolean indicating if an image with the
+// requested name, tag and architecture exists in the local docker image store
+func ImageExistsLocally(ctx context.Context, imageName string, platform string) (bool, error) {
+ return false, errors.New("Unsupported Operation")
+}
+
+// RemoveImage removes image from local store, the function is used to run different
+// container image architectures
+func RemoveImage(ctx context.Context, imageName string, force bool, pruneChildren bool) (bool, error) {
+ return false, errors.New("Unsupported Operation")
+}
+
+// NewDockerBuildExecutor function to create a run executor for the container
+func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor {
+ return func(ctx context.Context) error {
+ return errors.New("Unsupported Operation")
+ }
+}
+
+// NewDockerPullExecutor function to create a run executor for the container
+func NewDockerPullExecutor(input NewDockerPullExecutorInput) common.Executor {
+ return func(ctx context.Context) error {
+ return errors.New("Unsupported Operation")
+ }
+}
+
+// NewContainer creates a reference to a container
+func NewContainer(input *NewContainerInput) ExecutionsEnvironment {
+ return nil
+}
+
+func RunnerArch(ctx context.Context) string {
+ return runtime.GOOS
+}
+
+func GetHostInfo(ctx context.Context) (info types.Info, err error) {
+ return types.Info{}, nil
+}
+
+func NewDockerVolumeRemoveExecutor(volume string, force bool) common.Executor {
+ return func(ctx context.Context) error {
+ return nil
+ }
+}
+
+func NewDockerNetworkCreateExecutor(name string, config *types.NetworkCreate) common.Executor {
+ return func(ctx context.Context) error {
+ return nil
+ }
+}
+
+func NewDockerNetworkRemoveExecutor(name string) common.Executor {
+ return func(ctx context.Context) error {
+ return nil
+ }
+}