|
| 1 | +//go:build WITHOUT_DOCKER || !(linux || darwin || windows) |
| 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 | +} |
0 commit comments