Skip to content

Commit 6ab8f22

Browse files
shenxianpengclaude
andcommitted
refactor(install): drop the gh presence check, hosted runners always have it
GitHub-hosted runners ship gh; only a self-hosted runner can lack it, and there the attestation step fails anyway. The failure message now carries that hint instead of a separate pre-check. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018xYa7m3qup5wyN5MaXFgf6
1 parent 550e510 commit 6ab8f22

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The action is a composite step and uses what the runner already has:
8888
installs goes under `$RUNNER_TEMP`, never into your checkout.
8989
- **`gh` CLI** — used to verify the build-provenance attestation of the
9090
`commit-check` wheel before installing it. Present on GitHub-hosted images;
91-
install it on self-hosted runners or the step fails with `gh CLI not found`.
91+
install it on self-hosted runners or the attestation step fails.
9292
Only the `commit-check` wheel is attested; PyGithub and the transitive
9393
dependencies are pinned by `requirements.txt` but not verified.
9494
- **Network access to PyPI and `api.github.com`** — the pinned wheels are

‎action.yml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,9 @@ runs:
8383
8484
# Verify the commit-check wheel's build provenance (PyGithub and the
8585
# transitive wheels are pinned but not attested; see README "Runner requirements").
86-
if ! command -v gh >/dev/null 2>&1; then
87-
echo "::error::gh CLI not found; it is required to verify the commit-check wheel attestation. Install it on this runner (preinstalled on GitHub-hosted runners)."
88-
exit 1
89-
fi
9086
WHEEL=$(ls "$WORK"/wheels/commit_check-*.whl) # exactly one: pip download of a == pin
9187
if ! gh attestation verify "$WHEEL" -R commit-check/commit-check; then
92-
echo "::error::Attestation verification failed for $(basename "$WHEEL"). Aborting installation."
88+
echo "::error::Attestation verification failed for $(basename "$WHEEL") (self-hosted runners need the gh CLI). Aborting installation."
9389
exit 1
9490
fi
9591

0 commit comments

Comments
 (0)