Skip to content

Commit 104ac6c

Browse files
committed
Update Readme
1 parent f7ccd3f commit 104ac6c

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

.github/workflows/mockzilla.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ permissions:
1313
jobs:
1414
publish:
1515
runs-on: ubuntu-latest
16-
if: contains(github.event.pull_request.labels.*.name, 'Mockzilla')
16+
if: >-
17+
github.event_name == 'push' ||
18+
contains(github.event.pull_request.labels.*.name, 'Mockzilla')
1719
steps:
1820
- uses: actions/checkout@v4
1921

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,48 @@ make build
8484
```
8585

8686
See the [Connexions docs](https://github.com/mockzilla/connexions) for more options.
87+
88+
## Release
89+
90+
Every push to main/master generates code, builds binaries for Linux, macOS, and Windows (amd64 and arm64),
91+
and publishes them to the **Releases** page.
92+
Download the binary for your platform from the `latest` release and run it locally:
93+
94+
```bash
95+
./your-repo-name
96+
```
97+
98+
## Mockzilla workflow
99+
100+
The included GitHub Actions workflow (`.github/workflows/mockzilla.yml`) publishes your server to [Mockzilla](https://mockzilla.org) automatically:
101+
102+
- **Push to main/master** — builds and publishes the server to your main simulation
103+
- **Pull request with `Mockzilla` label** — deploys a preview simulation for the PR (torn down when the PR is closed)
104+
105+
The `Mockzilla` label is created automatically on first push via the setup workflow.
106+
107+
Your simulation will be available at:
108+
- `https://api.mockzilla.org/gh/{org}/{repo}/` — main branch
109+
- `https://api.mockzilla.org/gh/{org}/{repo}/pr-{n}/` — per pull request
110+
111+
### Action inputs
112+
113+
You can customize the action in `.github/workflows/mockzilla.yml`:
114+
115+
```yaml
116+
- uses: mockzilla/actions/codegen@v1
117+
with:
118+
token: ${{ secrets.GITHUB_TOKEN }}
119+
region: us-east-1 # optional — preferred AWS region, used as a hint on first deploy only
120+
memory: 128 # optional — memory in MB (e.g. 128, 256, 512)
121+
timeout: 10000 # optional — request timeout in milliseconds
122+
timeout-minutes: 5 # optional — max minutes to wait for simulation to become active (default: 5)
123+
```
124+
125+
| Input | Required | Description |
126+
|---|---|---|
127+
| `token` | yes | `GITHUB_TOKEN` — used to verify repo identity |
128+
| `region` | no | Preferred AWS region (e.g. `us-east-1`, `ap-southeast-1`). Used as a hint on first deploy — if at capacity, the nearest available region is used. Has no effect after the simulation is deployed. |
129+
| `memory` | no | Memory in megabytes (e.g. `128`, `256`, `512`). |
130+
| `timeout` | no | Request timeout for the simulation in milliseconds. |
131+
| `timeout-minutes` | no | Max minutes the action polls for the simulation to become active. Defaults to `5`. |

0 commit comments

Comments
 (0)