diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 1e39378..d0f3e08 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -13,7 +13,23 @@ jobs: # not a surprise on an unrelated push. image: swift:6.2 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 run: swift --version