-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_github_runner.ps1
More file actions
29 lines (24 loc) · 1.56 KB
/
Copy pathstart_github_runner.ps1
File metadata and controls
29 lines (24 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Start GitHub Actions Self-Hosted Runner
# This script starts the runner in a new window
Write-Host "`n=== Starting GitHub Actions Runner ===" -ForegroundColor Green
Write-Host "This will open a new window where the runner will execute workflows.`n" -ForegroundColor Cyan
$runnerPath = Join-Path $PSScriptRoot "actions-runner"
if (Test-Path "$runnerPath\run.cmd") {
Write-Host "✅ Runner found at: $runnerPath" -ForegroundColor Green
Write-Host "⚡ Opening runner in new window..." -ForegroundColor Yellow
Write-Host " Keep that window open while workflows execute!`n" -ForegroundColor Gray
# Use WorkingDirectory parameter to handle paths with spaces correctly
Start-Process powershell -WorkingDirectory $runnerPath -ArgumentList @(
"-NoExit",
"-Command",
"Write-Host '`n=== GitHub Actions Runner ===' -ForegroundColor Green; Write-Host 'Listening for workflow jobs...' -ForegroundColor Cyan; Write-Host 'Keep this window open!`n' -ForegroundColor Yellow; & '.\run.cmd'"
)
Write-Host "`n✅ Runner window opened!" -ForegroundColor Green
Write-Host "`nTo trigger workflows:" -ForegroundColor Yellow
Write-Host "1. Push code: git push origin main" -ForegroundColor Cyan
Write-Host "2. Or visit: https://github.com/Dev-Kavindu/ML-Project2/actions" -ForegroundColor Cyan
Write-Host " Click 'Run workflow' button`n" -ForegroundColor Cyan
} else {
Write-Host "❌ Runner not found at: $runnerPath" -ForegroundColor Red
Write-Host "Please ensure the actions-runner is configured.`n" -ForegroundColor Yellow
}