Clone the sibling repos with git, not a second actions/checkout

Run 413: a second use of actions/checkout in one job fails on this Windows
runner syncing the action's cached clone (pack .idx: Access is denied).
This commit is contained in:
2026-10-29 11:03:26 +00:00
parent 7124335fb7
commit 32dba6af2c
+23 -12
View File
@@ -50,21 +50,32 @@ jobs:
# (`../continuum-schemas`, `../continuum-common`), so all three are laid # (`../continuum-schemas`, `../continuum-common`), so all three are laid
# out side by side inside the workspace - the checkout action will not # out side by side inside the workspace - the checkout action will not
# place a repo outside it, which is why the proxy is in a subdirectory # place a repo outside it, which is why the proxy is in a subdirectory
# rather than at the root. The siblings are taken from the same branch # rather than at the root.
# name as this one: the proxy's code needs their unreleased commits.
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
path: continuum-proxy path: continuum-proxy
- uses: actions/checkout@v4
with: # Plain git for the siblings, not a second `actions/checkout`: on this
repository: Continuum/continuum-schemas # Windows runner a second use of the action in one job fails syncing the
ref: ${{ github.ref_name }} # action's own cached clone ("...\.git\objects\pack\...idx: Access is
path: continuum-schemas # denied", run 413). Same branch name as this one, because the proxy's
- uses: actions/checkout@v4 # code needs their unreleased commits. The job's token goes in a header
with: # for the clone and is never written to a remote URL or a log.
repository: Continuum/continuum-common - name: Check out the sibling repositories
ref: ${{ github.ref_name }} shell: powershell
path: continuum-common working-directory: .
env:
CI_TOKEN: ${{ github.token }}
CI_SERVER: ${{ github.server_url }}
CI_BRANCH: ${{ github.ref_name }}
run: |
$auth = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("x-access-token:$($env:CI_TOKEN)"))
foreach ($repo in @("continuum-schemas", "continuum-common")) {
if (Test-Path $repo) { Remove-Item -Recurse -Force $repo }
git -c "http.extraheader=AUTHORIZATION: basic $auth" clone --quiet --depth 1 --branch $env:CI_BRANCH "$($env:CI_SERVER)/Continuum/$repo.git" $repo
if ($LASTEXITCODE -ne 0) { throw "could not clone $repo at branch $($env:CI_BRANCH)" }
Write-Host "$repo at $(git -C $repo rev-parse --short HEAD)"
}
- name: Install the Rust MSVC toolchain - name: Install the Rust MSVC toolchain
shell: powershell shell: powershell