diff --git a/src/installation/index.md b/src/installation/index.md index c0c459b..294fb44 100644 --- a/src/installation/index.md +++ b/src/installation/index.md @@ -2,7 +2,7 @@ ## Necessary prerequisites for running `act` -`act` depends on `docker` (exactly Docker Engine API) to run workflows. +`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. 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/). diff --git a/src/usage/index.md b/src/usage/index.md index c86560c..d85ce1e 100644 --- a/src/usage/index.md +++ b/src/usage/index.md @@ -283,3 +283,23 @@ This will trigger the workflow to use the following matrix configurations only: - `os: macos-latest, node 10` 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) + +## Action Offline Mode + +If you want to speed up running act and using cached actions and container images you can enable this mode. + +- stops pulling existing images +- stops failing if an action has been cached and you cannot connect to GitHub +- pulls non existent actions and images +- act will work offline if it has at least ran once while you are online +- get rid of unnecessary timeouts when you have an unstable connection to GitHub or Container registries +- workaround rate limit problems + +```sh + act --action-offline-mode +``` + +or a `.actrc` file in your cwd like +``` +--action-offline-mode +``` diff --git a/src/usage/runners.md b/src/usage/runners.md index 90ad7a4..ae69ccb 100644 --- a/src/usage/runners.md +++ b/src/usage/runners.md @@ -39,7 +39,7 @@ If you need an environment that works just like the corresponding GitHub runner - [`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 -## Use an alternative runner image +### Use an alternative runner image To use a different image for the runner, use the `-P` option. @@ -59,3 +59,18 @@ For example, if your workflow uses `ubuntu-18.04`, `ubuntu-16.04` and `ubuntu-la ```sh act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -P ubuntu-latest=ubuntu:latest -P ubuntu-16.04=node:16-buster-slim ``` + +### Using local runner images + +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. + +Set `--pull` to false if a local docker image is needed +```sh + act --pull=false +``` + +Alternatively turn on offline mode + +```sh + act --action-offline-mode +```