-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (38 loc) · 2.11 KB
/
magiskmodule.yml
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Free RDP Tunnel by revWhiteShadow
on:
workflow_dispatch: # Manually trigger the workflow from GitHub UI
jobs:
setup-rdp-tunnel:
runs-on: windows-latest # This specifies the OS for the runner (Windows)
steps:
- name: Checkout Repository
uses: actions/checkout@v2 # Checkout the repository code
- name: Install Playit
run: |
Invoke-WebRequest -Uri "https://github.com/playit-cloud/playit-agent/releases/download/v0.15.26/playit-windows-x86_64-signed.exe" -OutFile "$env:USERPROFILE\playit.exe"
Start-Sleep -Seconds 5 # Wait for the download to complete
- name: Enable Remote Desktop and Sound
run: |
# Enable RDP
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name "fDenyTSConnections" -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name "UserAuthentication" -Value 1
# Enable Audio Redirection
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name "fDisableAudio" -Value 0
# Start Audio Service
Start-Service -Name "Audiosrv"
Set-Service -Name "Audiosrv" -StartupType Automatic
- name: Set RDP Password
run: |
Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "magiskmodule.gitlab.io!" -Force)
- name: Start Playit and Set Up RDP Tunnel
env:
PLAYIT_AUTH_KEY: ${{ secrets.PLAYIT_AUTH_KEY }} # Use secret for Playit authorization
run: |
# Start Playit with the secret key
Start-Process -FilePath "$env:USERPROFILE\playit.exe" -ArgumentList "--secret $env:PLAYIT_AUTH_KEY" -NoNewWindow -Wait
# Start Playit in the background
Start-Process -FilePath "$env:USERPROFILE\playit.exe" -NoNewWindow
- name: Keep the GitHub Action Runner Alive
run: |
Start-Sleep -Seconds 11800 # Adjust duration as necessary to keep the runner alive