You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: harden the github-report path for zero-config marketplace use
- An old pinned CLI no longer hard-fails the job: cli-version < 8.12.0
now falls back to the non-detached mode with reason
cli_version_too_old, skipping the preflight entirely.
- The preflight fetch gets a 10s AbortSignal timeout so a slow backend
can never stall the customer's job before tests run.
- The preflight command substitution tolerates a non-zero node exit
(OOM/kill) instead of aborting the whole action under set -e.
- The preflight-sourced reason is sanitized to [a-z0-9_] before being
interpolated into ::warning:: workflow commands and the step summary,
closing a workflow-command injection surface.
- resolve_github_repository/sha run once and feed both env configs,
dropping four redundant node forks per run; configure_github_report
loses its unreachable duplicate boolean validation.
- README/action.yml copy updated; tests cover the old-CLI fallback and
the invalid-boolean error.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ target URL explicitly through `env` or the workflow `env` block.
77
77
| Input | Description |
78
78
| --- | --- |
79
79
| `command` | `test` for local constructs or `trigger` for deployed checks. Defaults to `test`. |
80
-
| `cli-version` | Checkly CLI npm version. Defaults to `latest`. When `github-report` is enabled, pinned stable versions must be `8.12.0` or newer. Dist-tags, canaries, and prereleases are allowed. |
80
+
| `cli-version` | Checkly CLI npm version. Defaults to `latest`. GitHub Check writeback needs `8.12.0` or newer; older pinned versions fall back to waiting in the Action. Dist-tags, canaries, and prereleases are assumed compatible. |
81
81
| `working-directory` | Directory where the CLI command should run. Defaults to `.`. |
82
82
| `install-command` | Optional command to run before the Checkly CLI command, inside `working-directory`. |
83
83
| `tags` | One `--tags` filter per line. Each line can contain comma-separated tags. |
# canaries, and prereleases are allowed because they may point at compatible
91
-
# builds before a stable release exists.
92
-
if [[ "$version"=~ ^v?([0-9]+)\.([0-9]+)\.([0-9]+)$ ]];then
86
+
# Only exact pinned stable semver is comparable against the 8.12.0 floor.
87
+
#Dist-tags, ranges, canaries, and prereleases pass because they may point
88
+
#at compatible builds before a stable release exists.
89
+
if [[ "$version"=~ ^v?([0-9]+)\.([0-9]+)\.[0-9]+$ ]];then
93
90
local major="${BASH_REMATCH[1]}"
94
91
local minor="${BASH_REMATCH[2]}"
95
-
local patch="${BASH_REMATCH[3]}"
96
92
97
93
if(( major <8|| (major ==8&& minor <12) ));then
98
-
echo"::error::github-report requires Checkly CLI 8.12.0 or newer when cli-version is pinned. Use cli-version: latest, a canary/prerelease, or a version >= 8.12.0. Got '${version}'.">&2
99
-
exit 1
94
+
return 1
100
95
fi
101
-
102
-
# Keep shellcheck/linters happy that patch is intentionally parsed as part
103
-
# of the exact semver guard even though the minimum is major/minor aligned.
104
-
:"$patch"
105
96
fi
97
+
98
+
return 0
99
+
}
100
+
101
+
# Reasons are interpolated into ::warning:: workflow commands and the step
102
+
# summary; constrain them to a safe charset so a malformed or hostile
103
+
# preflight response can never inject workflow commands or extra lines.
# Writeback needs CLI >= 8.12.0, but an older pinned CLI is not an error:
412
+
# fall back to the non-detached mode like any other unavailable reason.
413
+
github_report_reason="cli_version_too_old"
421
414
clear_github_report_env
422
415
if [[ "${GITHUB_ACTIONS:-}"=="true" ]];then
423
-
echo"::warning::Checkly GitHub App reporting is unavailable (${github_report_reason}). Running without --detach so this GitHub Actions job waits for the Checkly test session result. Install the Checkly GitHub App on this repository to run detached and receive a Checkly GitHub Check instead."
416
+
echo"::warning::GitHub Check writeback needs Checkly CLI 8.12.0 or newer (cli-version is '${cli_version}'). Running without --detach so this GitHub Actions job waits for the Checkly test session result. Use cli-version: latest or >= 8.12.0 to enable detached GitHub Check reporting."
echo"::warning::Checkly GitHub App reporting is unavailable (${github_report_reason}). Running without --detach so this GitHub Actions job waits for the Checkly test session result. Install the Checkly GitHub App on this repository to run detached and receive a Checkly GitHub Check instead."
0 commit comments