actions/checkout is a JavaScript action and the swift image has no node, so the first run failed at exec: "node": executable file not found before any Swift step ran. Replaced with a plain git fetch of the SHA, falling back to the ref for servers without allowAnySHA1InWant. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C5X1tYo9oxAfvoiFMh1QQr
This commit is contained in:
@@ -13,7 +13,23 @@ jobs:
|
|||||||
# not a surprise on an unrelated push.
|
# not a surprise on an unrelated push.
|
||||||
image: swift:6.2
|
image: swift:6.2
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
# Checked out by hand rather than with actions/checkout, which is a
|
||||||
|
# JavaScript action — it needs `node` in the container, and the Swift
|
||||||
|
# image has no reason to ship one.
|
||||||
|
- name: Checkout
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
git init -q .
|
||||||
|
git config --local http.extraheader \
|
||||||
|
"Authorization: Basic $(printf 'x-access-token:%s' "$GITEA_TOKEN" | base64 -w0)"
|
||||||
|
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
|
||||||
|
# Fetching the exact SHA needs uploadpack.allowAnySHA1InWant on the
|
||||||
|
# server; fall back to the ref, which every server allows.
|
||||||
|
git fetch --depth 1 origin "$GITHUB_SHA" \
|
||||||
|
|| git fetch --depth 1 origin "$GITHUB_REF"
|
||||||
|
git checkout -q FETCH_HEAD
|
||||||
|
|
||||||
- name: Toolchain
|
- name: Toolchain
|
||||||
run: swift --version
|
run: swift --version
|
||||||
|
|||||||
Reference in New Issue
Block a user