From 40c30d0062cbfbef868e8c21d5be354864b37b42 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 18 Apr 2026 06:49:39 -0700 Subject: [PATCH] chore(ci): remove impossible local checkout action --- .github/actions/checkout-ci-fast/action.yml | 79 --------------------- 1 file changed, 79 deletions(-) delete mode 100644 .github/actions/checkout-ci-fast/action.yml diff --git a/.github/actions/checkout-ci-fast/action.yml b/.github/actions/checkout-ci-fast/action.yml deleted file mode 100644 index 2f49b2f31d1..00000000000 --- a/.github/actions/checkout-ci-fast/action.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Fast CI checkout -description: > - Perform a shallow detached checkout with timeout/retry behavior tuned for the - Linux CI lanes that have seen intermittent actions/checkout stalls. -inputs: - repo: - description: Repository in owner/name form. - required: true - sha: - description: Commit SHA to fetch and checkout. - required: true - token: - description: GitHub token used for authenticated fetches. - required: true - fetch-depth: - description: Depth to fetch from origin. - required: false - default: "1" - fetch-timeout-seconds: - description: Per-attempt fetch timeout in seconds. - required: false - default: "30" - attempts: - description: Number of checkout attempts before failing. - required: false - default: "2" -runs: - using: composite - steps: - - name: Fast checkout - shell: bash - env: - CHECKOUT_REPO: ${{ inputs.repo }} - CHECKOUT_SHA: ${{ inputs.sha }} - CHECKOUT_TOKEN: ${{ inputs.token }} - CHECKOUT_FETCH_DEPTH: ${{ inputs.fetch-depth }} - CHECKOUT_FETCH_TIMEOUT_SECONDS: ${{ inputs.fetch-timeout-seconds }} - CHECKOUT_ATTEMPTS: ${{ inputs.attempts }} - run: | - set -euo pipefail - - workdir="$GITHUB_WORKSPACE" - auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')" - - reset_checkout_dir() { - mkdir -p "$workdir" - find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} + - } - - checkout_attempt() { - local attempt="$1" - - reset_checkout_dir - git init "$workdir" >/dev/null - git config --global --add safe.directory "$workdir" - git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}" - git -C "$workdir" config gc.auto 0 - - timeout --signal=TERM "${CHECKOUT_FETCH_TIMEOUT_SECONDS}s" git -C "$workdir" \ - -c protocol.version=2 \ - -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \ - fetch --no-tags --prune --no-recurse-submodules --depth="${CHECKOUT_FETCH_DEPTH}" origin \ - "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1 - - git -C "$workdir" checkout --force --detach "$CHECKOUT_SHA" || return 1 - test -f "$workdir/.github/actions/setup-node-env/action.yml" || return 1 - echo "checkout attempt ${attempt}/${CHECKOUT_ATTEMPTS} succeeded" - } - - for attempt in $(seq 1 "$CHECKOUT_ATTEMPTS"); do - if checkout_attempt "$attempt"; then - exit 0 - fi - echo "checkout attempt ${attempt}/${CHECKOUT_ATTEMPTS} failed" - sleep $((attempt * 5)) - done - - echo "checkout failed after ${CHECKOUT_ATTEMPTS} attempts" >&2 - exit 1