Skip to content

Commit 6e0e116

Browse files
authored
add act readme, fix makefile yarn call to work as per: actions/setup-node#182 (comment) (#84)
1 parent 03b0fef commit 6e0e116

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
GitHub Actions Notes
2+
====================
3+
4+
Local Builds
5+
---------------
6+
You can locally test the GitHub Actions defined in this directory using [nektos act](https://github.com/nektos/act).
7+
8+
This allows you to run an equivalent CI build on your local machine. For example:
9+
```console
10+
$ act
11+
```
12+
Note: The first time you run [act](https://github.com/nektos/act), it can take a long time (with no output) to download
13+
the various docker goodies. Give it time before deciding it is stuck.
14+
15+
To get a list of available jobs, run:
16+
```console
17+
$ act -l
18+
```
19+
To run a specific job, use the `-j` flag:
20+
```console
21+
$ act -j <job-name>
22+
```
23+
For example, to run the `build` job from the `ci.yml` file, use this command:
24+
```console
25+
$ act --workflows .github/workflows/ci.yml -j build
26+
```
27+
If running on Apple silicon, and you see docker errors, try launching act with this flag:
28+
```console
29+
act --container-architecture linux/amd64
30+
```
31+
Without this flag, I saw this warning:
32+
```console
33+
WARN ⚠ You are using Apple M-series chip and you have not specified container architecture, you might encounter issues while running act. If so, try running it with '--container-architecture linux/amd64'. ⚠
34+
```
35+
and this error:
36+
```console
37+
... 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1] user= workdir=
38+
| docker compose build
39+
[+] Building 0.0s (0/0)
40+
| permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
41+
...
42+
```

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ docker:
3333
build: yarn go-build
3434

3535
yarn:
36-
yarn && NODE_OPTIONS=--openssl-legacy-provider yarn build
37-
# && yarn version --new-version $(VERSION)
36+
corepack yarn && NODE_OPTIONS=--openssl-legacy-provider corepack yarn build
37+
# && corepack yarn version --new-version $(VERSION)
3838

3939
go-build:
4040
echo "VERSION: $(VERSION)"

0 commit comments

Comments
 (0)