Skip to content

Commit 7787c44

Browse files
migrate "Using local runner images" docs
weaken docker requirement document action offline mode
1 parent 9b32fca commit 7787c44

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

src/installation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Necessary prerequisites for running `act`
44

5-
`act` depends on `docker` (exactly Docker Engine API) to run workflows.
5+
`act` depends on `docker` (exactly Docker Engine API) to run workflows in containers. As long you don't require container isolation, you can run selected (e.g. windows or macOS) jobs directly on your System see [Runners](../usage/runners.md). In the latter case you don't need to have docker installed or running.
66

77
If you are using macOS, please be sure to follow the steps outlined in [Docker Docs for how to install Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/install/).
88

src/usage/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,23 @@ This will trigger the workflow to use the following matrix configurations only:
283283
- `os: macos-latest, node 10`
284284

285285
Note that using the `--matrix` flag you can't add new values (for e.g. running the above workflow for node 20). It will simply ignore it. Moreover, the `exclude` field in the workflow will take precedance over the `--matrix` flag (for e.g. running the above workflow for only macos-latest and node 4 will result in no matrix configuration being used)
286+
287+
## Action Offline Mode
288+
289+
If you want to speed up running act and using cached actions and container images you can enable this mode.
290+
291+
- stops pulling existing images
292+
- stops failing if an action has been cached and you cannot connect to GitHub
293+
- pulls non existent actions and images
294+
- act will work offline if it has at least ran once while you are online
295+
- get rid of unnecessary timeouts when you have an unstable connection to GitHub or Container registries
296+
- workaround rate limit problems
297+
298+
```sh
299+
act --action-offline-mode
300+
```
301+
302+
or a `.actrc` file in your cwd like
303+
```
304+
--action-offline-mode
305+
```

src/usage/runners.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ If you need an environment that works just like the corresponding GitHub runner
3939

4040
- [`catthehacker/ubuntu:full-*`](https://github.com/catthehacker/docker_images/pkgs/container/ubuntu) - filesystem dump of the Runners provided by GitHub, see [`ChristopherHX/runner-image-blobs`](https://github.com/ChristopherHX/runner-image-blobs) or [`catthehacker/docker_images`](https://github.com/catthehacker/docker_images) for more information
4141

42-
## Use an alternative runner image
42+
### Use an alternative runner image
4343

4444
To use a different image for the runner, use the `-P` option.
4545

@@ -59,3 +59,18 @@ For example, if your workflow uses `ubuntu-18.04`, `ubuntu-16.04` and `ubuntu-la
5959
```sh
6060
act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -P ubuntu-latest=ubuntu:latest -P ubuntu-16.04=node:16-buster-slim
6161
```
62+
63+
### Using local runner images
64+
65+
The `--pull` flag is set to true by default due to a breaking on older default docker images. This would pull the docker image everytime act is executed.
66+
67+
Set `--pull` to false if a local docker image is needed
68+
```sh
69+
act --pull=false
70+
```
71+
72+
Alternatively turn on offline mode
73+
74+
```sh
75+
act --action-offline-mode
76+
```

0 commit comments

Comments
 (0)