Skip to content

Commit

Permalink
add act readme, fix makefile yarn call to work as per: actions/setup-…
Browse files Browse the repository at this point in the history
  • Loading branch information
bhamail committed Jul 11, 2024
1 parent 03b0fef commit afceb09
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/GITHUBACTIONS-README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
GitHub Actions Notes
====================

Local Builds
---------------
You can locally test the GitHub Actions defined in this directory using [nektos act](https://github.com/nektos/act).

This allows you to run an equivalent CI build on your local machine. For example:
```console
$ act
```
Note: The first time you run [act](https://github.com/nektos/act), it can take a long time (with no output) to download
the various docker goodies. Give it time before deciding it is stuck.

To get a list of available jobs, run:
```console
$ act -l
```
To run a specific job, use the `-j` flag:
```console
$ act -j <job-name>
```
For example, to run the `build` job from the `ci.yml` file, use this command:
```console
$ act --workflows .github/workflows/ci.yml -j build
```
If running on Apple silicon, and you see docker errors, try launching act with this flag:
```console
act --container-architecture linux/amd64
```
Without this flag, I saw this warning:
```console
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'. ⚠
```
and this error:
```console
... 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1] user= workdir=
| docker compose build
[+] Building 0.0s (0/0)
| 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
...
```
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ docker:
build: yarn go-build

yarn:
yarn && NODE_OPTIONS=--openssl-legacy-provider yarn build
# && yarn version --new-version $(VERSION)
corepack yarn && NODE_OPTIONS=--openssl-legacy-provider corepack yarn build
# && corepack yarn version --new-version $(VERSION)

go-build:
echo "VERSION: $(VERSION)"
Expand Down

0 comments on commit afceb09

Please sign in to comment.