ci(docker): 移除Git Extra Header配置并添加jq安装验证
移除不再需要的Git Extra Header配置步骤,并添加jq工具的安装验证逻辑以确保构建环境依赖完整
This commit is contained in:
parent
eb4db67fa1
commit
f75b109025
@ -30,20 +30,6 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 🔧 Fix Git Extra Header
|
||||
shell: powershell
|
||||
run: |
|
||||
# 移除可能的 extraheader 配置,包括带 %0A 的变体
|
||||
git config --global --unset-all http.https://git.kxsw.us/.extraheader
|
||||
git config --global --unset-all http."https://git.kxsw.us/".extraheader
|
||||
git config --global --unset-all http.https://git.kxsw.us/.extraheader%0A
|
||||
git config --global --unset-all http."https://git.kxsw.us/".extraheader%0A
|
||||
# 对于 submodule
|
||||
git submodule foreach --recursive "git config --local --unset-all http.https://git.kxsw.us/.extraheader || true"
|
||||
git submodule foreach --recursive "git config --local --unset-all http.https://git.kxsw.us/.extraheader%0A || true"
|
||||
# 验证
|
||||
git config --global --get-regexp http.*.extraheader || echo "No extraheader found"
|
||||
|
||||
- name: 🔧 设置 Go 环境
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
@ -145,6 +131,50 @@ jobs:
|
||||
shell: cmd
|
||||
run: call copy_libcore.bat
|
||||
|
||||
- name: 🔍 Verify jq Installation (ACT)
|
||||
shell: powershell
|
||||
run: |
|
||||
# Check if jq is available
|
||||
$jqFound = $false
|
||||
try {
|
||||
$version = jq --version 2>&1
|
||||
if ($version -match 'jq-[\d\.]+') {
|
||||
Write-Host "jq is already installed: $version"
|
||||
$jqFound = $true
|
||||
}
|
||||
} catch {
|
||||
Write-Host "jq not installed or not in PATH"
|
||||
}
|
||||
if (-not $jqFound) {
|
||||
Write-Host "Preparing to install jq..."
|
||||
# Check if Chocolatey is available
|
||||
$chocoFound = $false
|
||||
try {
|
||||
choco --version 2>&1 | Out-Null
|
||||
$chocoFound = $true
|
||||
} catch {}
|
||||
if (-not $chocoFound) {
|
||||
Write-Host "Installing Chocolatey..."
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
|
||||
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||
# Refresh PATH
|
||||
$env:PATH = [System.Environment]::GetEnvironmentVariable('PATH', 'Machine') + ';' + [System.Environment]::GetEnvironmentVariable('PATH', 'User')
|
||||
Write-Host "Chocolatey installed successfully"
|
||||
}
|
||||
Write-Host "Installing jq using Chocolatey..."
|
||||
choco install jq -y
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "jq installed successfully"
|
||||
# Verify again
|
||||
$version = jq --version 2>&1
|
||||
Write-Host "jq version: $version"
|
||||
} else {
|
||||
Write-Host "jq installation failed, exit code: $LASTEXITCODE"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user