Clone the sibling repos with git, not a second actions/checkout
Windows discovery tool / windows (push) Failing after 1m19s
Windows discovery tool / windows (push) Failing after 1m19s
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). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user