ci(windows): use native PowerShell git checkout to eliminate Node.js dependency on Windows runner

This commit is contained in:
2026-09-04 23:54:13 +02:00
parent fd6da560ed
commit 20a34bbbe7
+15 -6
View File
@@ -47,13 +47,22 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 shell: powershell
run: |
$server = "${{ github.server_url }}"
$token = "${{ secrets.TAG_TOKEN || github.token }}"
$repo = "${{ github.repository }}"
$cleanUrl = $server -replace "^https?://", ""
$authUrl = "https://${token}@${cleanUrl}/${repo}.git"
- name: Setup Python if (-not (Test-Path ".git")) {
uses: actions/setup-python@v5 git init
with: git remote add origin $authUrl
python-version: '3.12' } else {
continue-on-error: true git remote set-url origin $authUrl
}
git fetch --depth 1 origin "${{ github.sha }}"
git checkout -f FETCH_HEAD
- name: Install Dependencies - name: Install Dependencies
shell: powershell shell: powershell