Skip to content

Commit 3c7eda7

Browse files
fix: docker stub and add a test for this (#2355)
* fix: docker stub * test if you can build run without docker --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent a1a96da commit 3c7eda7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/checks.yml

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
upload-logs-name: logs-linux
6161
- name: Run act from cli
6262
run: go run main.go -P ubuntu-latest=node:16-buster-slim -C ./pkg/runner/testdata/ -W ./basic/push.yml
63+
- name: Run act from cli without docker support
64+
run: go run -tags WITHOUT_DOCKER main.go -P ubuntu-latest=-self-hosted -C ./pkg/runner/testdata/ -W ./local-action-js/push.yml
6365
- name: Upload Codecov report
6466
uses: codecov/codecov-action@v4
6567
with:

pkg/container/docker_stub.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"context"
77
"runtime"
88

9-
"github.com/docker/docker/api/types"
9+
"github.com/docker/docker/api/types/system"
1010
"github.com/nektos/act/pkg/common"
1111
"github.com/pkg/errors"
1212
)
@@ -46,8 +46,8 @@ func RunnerArch(ctx context.Context) string {
4646
return runtime.GOOS
4747
}
4848

49-
func GetHostInfo(ctx context.Context) (info types.Info, err error) {
50-
return types.Info{}, nil
49+
func GetHostInfo(ctx context.Context) (info system.Info, err error) {
50+
return system.Info{}, nil
5151
}
5252

5353
func NewDockerVolumeRemoveExecutor(volume string, force bool) common.Executor {

0 commit comments

Comments
 (0)