···11-Testing GH Actions with [ACT]
11+Testing GH Actions with ACT
2233Need to have credentials in a [`.secrets` file](https://nektosact.com/usage/index.html#secrets), copy and rename [`.secrets.example`](./secrets.example) to `.secrets`, then fill out blank fields. Required for docker/metadata-action to read...something. Fails with `Parameter token or opts.auth is required` if they are not supplied.
4455-An ENV file can also be made by copy and renaming [`.env.example`](./env.example). Set `NO_DOCKER_BUILD=true` if you only want to test APP_VERSION and docker tags output.
55+An ENV file can also be made by copy and renaming [`.env.example`](./env.example). Set `NO_DOCKER_BUILD=true` if you only want to test APP_VERSION and docker tags output.
66+77+If running a full docker build for multi-runner workflows you will need to create an [artifact server](https://github.com/nektos/act/issues/329#issuecomment-1905955589) for ACT to work:
88+99+1010+```shell
1111+docker pull ghcr.io/jefuller/artifact-server:latest
1212+docker run -d --name artifact-server -p 8082:8080 --add-host host.docker.internal:host-gateway -e AUTH_KEY=foo ghcr.io/jefuller/artifact-server:latest
1313+```
614715Run the following **from this directory** to make use of `.actrc` and proper working directoy.
816···2533```shell
2634act -W '.github/act/actTest.yml' -e '.github/act/actTagPreEvent.json'
2735```
3636+3737+### Test Multi-Runner Push (WIP)
3838+3939+```shell
4040+act -W '.github/act/multiRunnerTest.yml' -e '.github/act/actBranchEvent.json'
4141+```
4242+4343+### Test Multi-Runner Bake Push (WIP)
4444+4545+```shell
4646+act -W '.github/act/multiRunnerBakeTest.yml' -e '.github/act/actBranchEvent.json'
4747+```