Make MSUpdate w1123h264 by @xrgzs - Multi - SkipCheck #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MSUpdate | |
run-name: Make MSUpdate ${{ inputs.makeversion }} by @${{ github.actor }} ${{ inputs.UpdateFromUUP == true && '- UUP' || '' }} ${{ inputs.MultiEdition == true && '- Multi' || ''}} ${{ inputs.SkipCheck == true && '- SkipCheck' || ''}} | |
on: | |
workflow_dispatch: | |
inputs: | |
makeversion: | |
description: '选择制作的系统版本' | |
required: true | |
type: choice | |
options: | |
- w1124h264 | |
- w1123h264 | |
- w1022h264 | |
- w1022h232 | |
- w11lt2464 | |
- w10lt2164 | |
- w10lt2132 | |
- w10lt1964 | |
- w10lt1932 | |
- w10lt1664 | |
- w10lt1632 | |
UpdateFromUUP: | |
description: '从UUPDUMP获取更新(1809+)' | |
required: false | |
default: true | |
type: boolean | |
MultiEdition: | |
description: '转换多版本(LTSC勿选)' | |
required: false | |
default: true | |
type: boolean | |
SkipCheck: | |
description: '跳过硬件检测(Win11)' | |
required: false | |
default: false | |
type: boolean | |
jobs: | |
msupdate: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Change DNS Server | |
shell: pwsh | |
run: | | |
$newDnsServers = @('1.1.1.1', '8.8.8.8') | |
$networkAdapters = Get-NetAdapter | Where-Object { $_.Status -eq 'Up' } | |
foreach ($adapter in $networkAdapters) { | |
Set-DnsClientServerAddress -InterfaceIndex $adapter.ifIndex -ResetServerAddresses | |
Set-DnsClientServerAddress -InterfaceIndex $adapter.ifIndex -ServerAddresses $newDnsServers | |
} | |
ipconfig /flushdns | |
- name: Big Task | |
shell: pwsh | |
run: | | |
$MakeVersion = [string] "${{ inputs.MakeVersion }}" | |
$UpdateFromUUP = [bool] $${{ inputs.UpdateFromUUP }} | |
$MultiEdition = [bool] $${{ inputs.MultiEdition }} | |
$SkipCheck = [bool] $${{ inputs.SkipCheck }} | |
.\msupdate.ps1 | |
- name: Get rclone Config | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ vars.RCLONE_REPO }} | |
token: ${{ secrets.RCLONE_TOKEN }} | |
path: bin | |
- name: Upload ISO to OneDrive | |
shell: pwsh | |
run: | | |
# Installing dependencies | |
if (-not (Test-Path -Path ".\bin\rclone.conf")) { | |
Write-Error "rclone conf not found" | |
} | |
if (-not (Test-Path -Path ".\bin\rclone.exe")) { | |
Write-Host "rclone not found, downloading..." | |
Invoke-WebRequest -Uri 'https://downloads.rclone.org/rclone-current-windows-amd64.zip' -outfile .\temp\rclone.zip | |
Expand-Archive -Path .\temp\rclone.zip -DestinationPath .\temp\ -Force | |
Copy-Item -Path .\temp\rclone-*-windows-amd64\rclone.exe -Destination .\bin\rclone.exe | |
} | |
# upload to cloud | |
Get-ChildItem -Path ".\*.json" -File | ForEach-Object { | |
$json = Get-Content $_.FullName | Convertfrom-Json | |
.\bin\rclone.exe copy ".\$($json.name)" "${{ vars.RCLONE_PATH }}\$($json.os_ver)\$($json.os_release)\$($json.os_version)" --progress | |
.\bin\rclone.exe copy "$($_.FullName)" "${{ vars.RCLONE_PATH }}\$($json.os_ver)\$($json.os_release)\$($json.os_version)" --progress | |
.\bin\rclone.exe copyto "$($_.FullName)" "${{ vars.RCLONE_PATH }}\$($json.os_ver)\$($json.os_release)\latest_$($json.os_arch).json" --progress | |
} |