Skip to content

Commit 37a98f1

Browse files
Ryan (hackercat)mergify[bot]
Ryan (hackercat)
andauthored
feat: add go install instruction (#672)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 92eec3a commit 37a98f1

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

README.md

+22-11
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ or in a shell by running
8282
nix-shell -p act
8383
```
8484

85+
If you have Go 1.16+, you can install latest released version of `act` directly from source by running:
86+
87+
```sh
88+
go install github.com/nektos/act@latest
89+
```
90+
91+
or if you want to install latest unreleased version:
92+
93+
```sh
94+
go install github.com/nektos/act@master
95+
```
96+
8597
# Commands
8698

8799
```sh
@@ -156,9 +168,8 @@ It will save that information to `~/.actrc`, please refer to [Configuration](#co
156168
A `MODULE_NOT_FOUND` during `docker cp` command [#228](https://github.com/nektos/act/issues/228) can happen if you are relying on local changes that have not been pushed. This can get triggered if the action is using a path, like:
157169

158170
```yaml
159-
160-
- name: test action locally
161-
uses: ./
171+
- name: test action locally
172+
uses: ./
162173
```
163174
164175
In this case, you _must_ use `actions/checkout@v2` with a path that _has the same name as your repository_. If your repository is called _my-action_, then your checkout step would look like:
@@ -181,12 +192,12 @@ Running `act` on Windows host is currently broken - see [#587](https://github.co
181192

182193
GitHub Actions offers managed [virtual environments](https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners) for running workflows. In order for `act` to run your workflows locally, it must run a container for the runner defined in your workflow file. Here are the images that `act` uses for each runner type and size:
183194

184-
| GitHub Runner | Micro Docker Image | Medium Docker Image | Large Docker Image |
185-
| --------------- | ------------------------------------ | ------------------------------------------ | ------------------------------------------------------ |
186-
| `ubuntu-latest` | [`node:12.20.1-buster-slim`][micro] | [`catthehacker/ubuntu:act-latest`][medium] | [`catthehacker/ubuntu:full-20.04`][large-cat] |
187-
| `ubuntu-20.04` | [`node:12.20.1-buster-slim`][micro] | [`catthehacker/ubuntu:act-20.04`][medium] | [`catthehacker/ubuntu:full-20.04`][large-cat] |
188-
| `ubuntu-18.04` | [`node:12.20.1-buster-slim`][micro] | [`catthehacker/ubuntu:act-18.04`][medium] | [`nektos/act-environments-ubuntu:18.04`][large-act] |
189-
| `ubuntu-16.04` | [`node:12.20.1-stretch-slim`][micro] | [`catthehacker/ubuntu:act-16.04`][medium] | `unavailable` |
195+
| GitHub Runner | Micro Docker Image | Medium Docker Image | Large Docker Image |
196+
| --------------- | ------------------------------------ | ------------------------------------------ | --------------------------------------------------- |
197+
| `ubuntu-latest` | [`node:12.20.1-buster-slim`][micro] | [`catthehacker/ubuntu:act-latest`][medium] | [`catthehacker/ubuntu:full-20.04`][large-cat] |
198+
| `ubuntu-20.04` | [`node:12.20.1-buster-slim`][micro] | [`catthehacker/ubuntu:act-20.04`][medium] | [`catthehacker/ubuntu:full-20.04`][large-cat] |
199+
| `ubuntu-18.04` | [`node:12.20.1-buster-slim`][micro] | [`catthehacker/ubuntu:act-18.04`][medium] | [`nektos/act-environments-ubuntu:18.04`][large-act] |
200+
| `ubuntu-16.04` | [`node:12.20.1-stretch-slim`][micro] | [`catthehacker/ubuntu:act-16.04`][medium] | `unavailable` |
190201

191202
[micro]: https://hub.docker.com/_/buildpack-deps
192203
[medium]: https://github.com/catthehacker/docker_images
@@ -218,7 +229,7 @@ If you need an environment that works just like the corresponding GitHub runner
218229
:warning: :elephant: `*** WARNING - this image is >18GB 😱***`
219230

220231
- [`catthehacker/ubuntu:full-20.04`](https://hub.docker.com/r/catthehacker/ubuntu/tags) - built from Dockerfile based on the Packer template from [actions/virtual-environments](https://github.com/actions/runner).
221-
This image size is about `61GB` unpacked (`23GB` compressed) but contains more recent software versions (as of date of build).
232+
This image size is about `61GB` unpacked (`23GB` compressed) but contains more recent software versions (as of date of build).
222233

223234
## Use an alternative runner image
224235

@@ -324,7 +335,7 @@ Need help? Ask on [Gitter](https://gitter.im/nektos/act)!
324335

325336
Want to contribute to act? Awesome! Check out the [contributing guidelines](CONTRIBUTING.md) to get involved.
326337

327-
## Building from source
338+
## Manually building from source
328339

329340
- Install Go tools 1.16+ - (<https://golang.org/doc/install>)
330341
- Clone this repo `git clone [email protected]:nektos/act.git`

0 commit comments

Comments
 (0)