From 87452e087c89c0e9c9f03e81c062c8c58824f56c Mon Sep 17 00:00:00 2001 From: Joost de Valk Date: Fri, 27 Nov 2026 14:20:21 +0100 Subject: [PATCH] Make the Plugin Check setup reliable Pin WP-CLI to the 2.12.0 release so setup-php does not depend on the mutable latest-build download, which failed with "Could not setup wp-cli" and left the job to die on "wp: command not found". Fail at the setup step if a tool cannot be installed, and let Composer clone dist-archive-command over HTTPS when it cannot use the GitHub API. Co-Authored-By: Claude Fable 5.2 --- .github/workflows/plugin-check.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index 9d5c98e..3800249 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -15,7 +15,12 @@ jobs: with: php-version: '8.3' coverage: none - tools: wp-cli + # A pinned release archive, not the mutable latest-build URL: when + # that download fails, setup-php only logs "Could not setup wp-cli" + # and the job dies later with "wp: command not found". + tools: wp-cli:2.12.0 + env: + fail-fast: true # setup-php stores the ephemeral Actions token in ~/.composer/auth.json # as a github-oauth credential. Composer rejects that token whenever it @@ -38,6 +43,9 @@ jobs: - name: Install latest version of dist-archive-command run: | rm -f "$(composer config --global home 2>/dev/null)/auth.json" + # Without a token Composer may fall back to cloning over SSH, and + # the runner has no key. HTTPS works for this public repository. + git config --global url."https://github.com/".insteadOf "git@github.com:" wp package install wp-cli/dist-archive-command:v3.1.0 - name: Build plugin