Windows-CRD #20
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
# Windows-CRD.yml | |
name: Windows-CRD | |
on: | |
workflow_dispatch: | |
inputs: | |
authcode: | |
description: 'Enter CRD code' | |
required: true | |
pincode: | |
description: 'Six digit Pin' | |
required: true | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Initializing Setup | |
run: ./setup.ps1 | |
shell: pwsh | |
- name: Starting CRD | |
run: | | |
$authCode = '${{ github.event.inputs.authcode }}' | |
$pinCode = '${{ github.event.inputs.pincode }}' | |
$crdPath = [System.Environment]::GetEnvironmentVariable('CRD_PATH', [System.EnvironmentVariableTarget]::Machine) | |
if (Test-Path $crdPath) { | |
Write-Output "Starting Chrome Remote Desktop with auth code and pin." | |
Start-Process -FilePath $crdPath -ArgumentList "--start --code=$authCode --pin=$pinCode" -Wait | |
} else { | |
Write-Error "Chrome Remote Desktop executable not found at path: $crdPath" | |
exit 1 | |
} | |
shell: pwsh | |
- name: Keep Alive | |
run: ./timeout.ps1 | |
shell: pwsh |