Make MSUpdate w1164 by @xrgzs #37
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 }} | |
on: | |
workflow_dispatch: | |
inputs: | |
makeversion: | |
description: 'Target OS Version' | |
required: true | |
type: choice | |
options: | |
- w1164 | |
- w1064 | |
- w10lt2164 | |
- w10lt1964 | |
- w10lt1664 | |
UpdateFromUUP: | |
description: 'Update from UUP' | |
required: false | |
type: boolean | |
MultiEdition: | |
description: 'Convert Multi-Editions' | |
required: false | |
type: boolean | |
jobs: | |
msupdate: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get rclone Config | |
uses: actions/checkout@v4 | |
with: | |
repository: xrgzs/rclone-action | |
token: ${{ secrets.RCLONE_TOKEN }} | |
path: bin | |
- 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 }}" | |
.\msupdate.ps1 |