Skip to content

Check UUPDUMP

Check UUPDUMP #1463

Workflow file for this run

name: Check UUPDUMP
run-name: Check UUPDUMP ${{ inputs.DatabaseOnly == true && '(DatabaseOnly)' || '' }}
on:
schedule:
# Runs at 20 minutes past the hour, every 12 hours, starting at 04:00.
- cron: "20 4/12 * * *"
workflow_dispatch:
inputs:
DatabaseOnly:
description: "仅更新数据"
required: false
default: false
type: boolean
jobs:
check:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Git user
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
# - 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) {
# try {
# Set-DnsClientServerAddress -InterfaceIndex $adapter.ifIndex -ResetServerAddresses
# Set-DnsClientServerAddress -InterfaceIndex $adapter.ifIndex -ServerAddresses $newDnsServers
# } catch {
# Write-Host "Failed to set DNS for adapter $($adapter.Name): $_"
# }
# }
# ipconfig /flushdns
# - name: Install Cloudflare WRAP
# shell: pwsh
# run: |
# Write-Host "installing Cloudflare WARP..."
# Invoke-WebRequest -Uri "https://1111-releases.cloudflareclient.com/win/latest" -OutFile "C:\cfwarp.msi"
# Start-Process "msiexec.exe" -ArgumentList "/i C:\cfwarp.msi /qn" -Wait
# . "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe" registration new
# . "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe" connect
# # Add a loop to wait for the status to be connected
# for ($attemptCount = 0; $attemptCount -lt 10; $attemptCount++) {
# $output = . "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe" status
# Write-Host $output
# if ($output -like "*Status update: Connected*") {
# break
# }
# Start-Sleep -Seconds 5 # Wait for 5 seconds before checking again
# }
# if ($attemptCount -eq 10) {
# Write-Host "Failed to connect after 10 attempts."
# exit 1 # Exit with an error code
# }
- name: Small Task
shell: pwsh
env:
GH_TOKEN: ${{ secrets.RCLONE_TOKEN }}
run: |
.\.github\workflows\check.ps1 ${{ inputs.DatabaseOnly == true && '-DatabaseOnly' || '' }}
# - name: Disconnect Cloudflare WRAP
# shell: pwsh
# run: |
# if (Test-Path "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe") {
# try {
# . "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe" disconnect
# }
# catch {
# Write-Warning "Failed to disconnect Cloudflare WARP"
# }
# }
- name: Commit and Push Changes
shell: pwsh
run: |
git add State.yml
git commit -m "Update State.yml $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
git push