Commit bfb4fa8
Eric Bower
·
2026-08-15 12:31:41 -0400 EDT
parent b873742
docs: prop
1 files changed,
+3,
-3
+3,
-3
1@@ -48,7 +48,7 @@ jobs:
2 | Input | Description | Default |
3 | :--- | :--- | :--- |
4 | `pico_ssh_key` | SSH private key registered with pico.sh for authenticated debug relay access. | `""` (optional, required for debug relay) |
5-| `debug_on_fail` | Automatically open an interactive `pipe.pico.sh` debug bridge if a job fails. | `"false"` |
6+| `debug_on_fail` | Automatically open an interactive `pipe.pico.sh` debug bridge if a job fails. If omitted or `auto`, automatically enables when re-running with GitHub debug logging (`RUNNER_DEBUG=1`). | `"auto"` |
7
8 ### What `pico-sh/pici-action` Does Under the Hood
9 1. **Tool Installation**: Installs the static `pici` and pinned `zmx` binaries (with SHA256 checksum verification) to `/usr/local/bin`.
10@@ -58,7 +58,7 @@ jobs:
11 - `PICI_EVENT="git.${GITHUB_EVENT_NAME}"`
12 - `PICI_BRANCH="${GITHUB_REF_NAME}"`
13 - `PICI_COMMIT="${GITHUB_SHA}"`
14-4. **Execution (`pici run`)**: Invokes `pici run --in-place` (with `--debug-on-fail` if enabled).
15+4. **Execution (`pici run`)**: Invokes `pici run --in-place` (enabling `--debug-on-fail` if `debug_on_fail: true` or if GitHub's native debug re-run is active via `RUNNER_DEBUG=1`).
16 5. **Job Summaries & Artifact Upload**:
17 - `pici` formats the run status table and failed logs into `$GITHUB_STEP_SUMMARY`.
18 - If `upload_artifacts` is enabled, the action uploads `/tmp/pici-artifacts/<repo>/<jobid>/` as a workflow artifact.
19@@ -86,7 +86,7 @@ For users who prefer manual step-by-step control or non-GitHub CI environments,
20 Rather than relying on bash scripts with named FIFOs (`mkfifo`) and background `ssh -N` commands, the relay bridge is implemented directly in Go inside `pici`:
21
22 ### How it works
23-1. **Hook into Failure Path**: When `resolveJobExitCode()` detects a non-zero exit in `waitAndReport()` and debug mode is enabled (e.g. `--debug-on-fail` or `-e PICI_DEBUG=1`), `pici` initializes the debug session.
24+1. **Hook into Failure Path**: When `resolveJobExitCode()` detects a non-zero exit in `waitAndReport()` and debug mode is enabled (via `--debug-on-fail`, `-e PICI_DEBUG=1`, or GitHub Actions' standard `RUNNER_DEBUG=1`), `pici` initializes the debug session.
25 2. **Native SSH Dialing**: `pici` dials `pipe.pico.sh` using the existing `-pk` / `-ck` SSH key infrastructure.
26 3. **PTY Allocation (`creack/pty`)**: Spawns an interactive shell (`bash -i` or `$SHELL`) connected to the bidirectional SSH stream.
27 4. **Attach Instructions & Notifications**: Prints the `ssh -t pipe.pico.sh pipe <topic>` command to stdout and appends it to `$GITHUB_STEP_SUMMARY`.