Skip to content

Commit 1763881

Browse files
authored
Merge pull request #4 from useblacksmith/v2/update-readme
begin-testbox: update readme for v2 actions
2 parents ee24359 + fd09b23 commit 1763881

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

README.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# begin-testbox
22

3-
First half of the Blacksmith Testbox action pair. This action runs right after `actions/checkout` and before your dependency installation steps. It installs an SSH public key for remote access, ensures `rsync` is available, and phones home to the Testbox API with a `hydrating` status.
3+
First half of the Blacksmith Testbox action pair. This action runs right after `actions/checkout` and before your dependency installation steps. It discovers configuration from the VM metadata service, phones home to the Testbox API with a `hydrating` status, installs the SSH public key returned by the API, and ensures `rsync` is available.
44

55
Pair this with [useblacksmith/run-testbox](https://github.com/useblacksmith/run-testbox), which runs after your setup steps to signal the testbox is ready and keep the runner alive until idle timeout.
66

@@ -11,34 +11,29 @@ steps:
1111
- uses: actions/checkout@v4
1212

1313
- name: Begin Testbox
14-
uses: useblacksmith/begin-testbox@v1
14+
uses: useblacksmith/begin-testbox@v2
1515
with:
1616
testbox_id: ${{ inputs.testbox_id }}
17-
testbox_token: ${{ inputs.testbox_token }}
18-
idle_timeout: ${{ inputs.idle_timeout }}
19-
api_url: ${{ inputs.api_url }}
20-
ssh_public_key: ${{ inputs.ssh_public_key }}
2117

2218
# --- your setup steps here ---
2319
- uses: actions/setup-node@v4
2420
- run: npm ci
2521
# --- end setup ---
2622

2723
- name: Run Testbox
28-
uses: useblacksmith/run-testbox@v1
29-
with:
30-
testbox_id: ${{ inputs.testbox_id }}
31-
testbox_token: ${{ inputs.testbox_token }}
32-
idle_timeout: ${{ inputs.idle_timeout }}
33-
api_url: ${{ inputs.api_url }}
24+
uses: useblacksmith/run-testbox@v2
3425
```
3526
3627
## Inputs
3728
3829
| Input | Required | Default | Description |
3930
|-------|----------|---------|-------------|
4031
| `testbox_id` | yes | | Testbox session ID |
41-
| `testbox_token` | yes | | Bearer token for phone-home authentication |
42-
| `idle_timeout` | no | `10` | Idle timeout in minutes |
43-
| `api_url` | yes | | Backend API URL for phone-home callbacks |
44-
| `ssh_public_key` | no | `''` | SSH public key to install for access |
32+
33+
## How it works
34+
35+
1. Reads `installationModelID`, `backendURL`, and `stickyDiskToken` from the VM metadata service
36+
2. Phones home to `/api/testbox/phone-home` with `hydrating` status, authenticated via the sticky disk token
37+
3. Receives `ssh_public_key` and `idle_timeout` from the API response
38+
4. Writes state to `/tmp/.testbox/` for `run-testbox` to consume
39+
5. Installs the SSH public key and ensures `rsync` is available

0 commit comments

Comments
 (0)