github.com/nektos/act@v0.2.63/pkg/container/docker_stub.go (about)

     1  //go:build WITHOUT_DOCKER || !(linux || darwin || windows || netbsd)
     2  
     3  package container
     4  
     5  import (
     6  	"context"
     7  	"runtime"
     8  
     9  	"github.com/docker/docker/api/types"
    10  	"github.com/nektos/act/pkg/common"
    11  	"github.com/pkg/errors"
    12  )
    13  
    14  // ImageExistsLocally returns a boolean indicating if an image with the
    15  // requested name, tag and architecture exists in the local docker image store
    16  func ImageExistsLocally(ctx context.Context, imageName string, platform string) (bool, error) {
    17  	return false, errors.New("Unsupported Operation")
    18  }
    19  
    20  // RemoveImage removes image from local store, the function is used to run different
    21  // container image architectures
    22  func RemoveImage(ctx context.Context, imageName string, force bool, pruneChildren bool) (bool, error) {
    23  	return false, errors.New("Unsupported Operation")
    24  }
    25  
    26  // NewDockerBuildExecutor function to create a run executor for the container
    27  func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor {
    28  	return func(ctx context.Context) error {
    29  		return errors.New("Unsupported Operation")
    30  	}
    31  }
    32  
    33  // NewDockerPullExecutor function to create a run executor for the container
    34  func NewDockerPullExecutor(input NewDockerPullExecutorInput) common.Executor {
    35  	return func(ctx context.Context) error {
    36  		return errors.New("Unsupported Operation")
    37  	}
    38  }
    39  
    40  // NewContainer creates a reference to a container
    41  func NewContainer(input *NewContainerInput) ExecutionsEnvironment {
    42  	return nil
    43  }
    44  
    45  func RunnerArch(ctx context.Context) string {
    46  	return runtime.GOOS
    47  }
    48  
    49  func GetHostInfo(ctx context.Context) (info types.Info, err error) {
    50  	return types.Info{}, nil
    51  }
    52  
    53  func NewDockerVolumeRemoveExecutor(volume string, force bool) common.Executor {
    54  	return func(ctx context.Context) error {
    55  		return nil
    56  	}
    57  }
    58  
    59  func NewDockerNetworkCreateExecutor(name string) common.Executor {
    60  	return func(ctx context.Context) error {
    61  		return nil
    62  	}
    63  }
    64  
    65  func NewDockerNetworkRemoveExecutor(name string) common.Executor {
    66  	return func(ctx context.Context) error {
    67  		return nil
    68  	}
    69  }