Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
4.3 kB · 114 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115# Setup GitHub Actions Self-Hosted Runner# This script configures the GitHub Actions runner on the build VM
param( [Parameter(Mandatory=$true)] [string]$GitHubToken # Get from: https://github.com/whistlegraph/aesthetic-computer/settings/actions/runners/new)
$ErrorActionPreference = "Stop"
Write-Host ""Write-Host "╔════════════════════════════════════════════════╗" -ForegroundColor CyanWrite-Host "║ Setting up GitHub Actions Self-Hosted Runner ║" -ForegroundColor CyanWrite-Host "╚════════════════════════════════════════════════╝" -ForegroundColor CyanWrite-Host ""
# Runner directory should already exist from bootstrap$RunnerPath = "C:\actions-runner"if (!(Test-Path $RunnerPath)) { Write-Error "Runner directory not found. Run bootstrap-windows-minimal.ps1 first." exit 1}
cd $RunnerPath
# Configure the runnerWrite-Host "Configuring runner..." -ForegroundColor YellowWrite-Host " Organization: whistlegraph/aesthetic-computer" -ForegroundColor GrayWrite-Host " Labels: self-hosted, Windows, X64, ue5-builder" -ForegroundColor Gray
try { .\config.cmd ` --url https://github.com/whistlegraph/aesthetic-computer ` --token $GitHubToken ` --name "ue5-builder-falsework" ` --labels "self-hosted,Windows,X64,ue5-builder" ` --work "_work" ` --unattended ` --replace if ($LASTEXITCODE -ne 0) { throw "Runner configuration failed" } Write-Host "✓ Runner configured" -ForegroundColor Green} catch { Write-Error "Failed to configure runner: $_" exit 1}
# Install runner as a Windows serviceWrite-Host ""Write-Host "Installing runner as Windows service..." -ForegroundColor Yellow
try { .\svc.cmd install if ($LASTEXITCODE -ne 0) { throw "Service installation failed" } Write-Host "✓ Service installed" -ForegroundColor Green} catch { Write-Error "Failed to install service: $_" exit 1}
# Start the serviceWrite-Host ""Write-Host "Starting runner service..." -ForegroundColor Yellow
try { .\svc.cmd start if ($LASTEXITCODE -ne 0) { throw "Service start failed" } Write-Host "✓ Service started" -ForegroundColor Green} catch { Write-Error "Failed to start service: $_" exit 1}
# Copy build script to C:\scriptsWrite-Host ""Write-Host "Setting up build scripts..." -ForegroundColor Yellow$ScriptsDir = "C:\scripts"if (!(Test-Path $ScriptsDir)) { New-Item -ItemType Directory -Path $ScriptsDir | Out-Null}
# The daily-build.ps1 script should be copied here from the repoWrite-Host " Create C:\scripts\daily-build.ps1 from the repo" -ForegroundColor GrayWrite-Host " Path: false.work/unreal-builder/scripts/daily-build.ps1" -ForegroundColor Gray
Write-Host ""Write-Host "╔════════════════════════════════════════════════╗" -ForegroundColor GreenWrite-Host "║ GitHub Runner Setup Complete! ║" -ForegroundColor GreenWrite-Host "╚════════════════════════════════════════════════╝" -ForegroundColor GreenWrite-Host ""Write-Host "✅ Runner is now active and waiting for jobs" -ForegroundColor CyanWrite-Host ""Write-Host "Next steps:" -ForegroundColor YellowWrite-Host "1. Copy daily-build.ps1 to C:\scripts\" -ForegroundColor WhiteWrite-Host "2. Add secrets to GitHub repo:" -ForegroundColor WhiteWrite-Host " - P4_SERVER: ssl:falsework.helixcore.io:1666" -ForegroundColor GrayWrite-Host " - P4_USER: machine" -ForegroundColor GrayWrite-Host " - P4_PASSWORD: (from vault)" -ForegroundColor GrayWrite-Host " - P4_WORKSPACE: spiderlily_build_workspace" -ForegroundColor GrayWrite-Host "3. Trigger workflow from GitHub Actions tab" -ForegroundColor WhiteWrite-Host ""Write-Host "View runner status: https://github.com/whistlegraph/aesthetic-computer/settings/actions/runners" -ForegroundColor CyanWrite-Host ""
exit 0