0% found this document useful (0 votes)
296 views1 page

Script (RDP) Free TH 2025

The document provides instructions for setting up the Playit RDP Tunnel on a Windows machine using a GitHub Actions workflow. It includes steps to add the Playit repository, install the Playit application, and configure Remote Desktop settings. Additionally, it outlines how to start the Playit service and keep the GitHub Action Runner alive during the process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
296 views1 page

Script (RDP) Free TH 2025

The document provides instructions for setting up the Playit RDP Tunnel on a Windows machine using a GitHub Actions workflow. It includes steps to add the Playit repository, install the Playit application, and configure Remote Desktop settings. Additionally, it outlines how to start the Playit service and keep the GitHub Action Runner alive during the process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

curl -SsL https://playit-cloud.github.io/ppa/key.

gpg | gpg --dearmor | sudo tee


/etc/apt/trusted.gpg.d/playit.gpg >/dev/null
echo "deb [signed-by=/etc/apt/trusted.gpg.d/playit.gpg] https://playit-
cloud.github.io/ppa/data ./" | sudo tee /etc/apt/sources.list.d/playit-cloud.list
sudo apt update
sudo apt install playit

###################################################################################
######################################################################

name: Playit RDP Tunnel

on:
workflow_dispatch:

jobs:
setup-rdp-tunnel:
runs-on: windows-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Download and 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 # Give some time for the download to complete

# Default, optional.
- name: Enable TS
run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal
Server'-name "fDenyTSConnections" -Value 0
- run: Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
- run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal
Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1
- run: Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -
AsPlainText "p@ssw0rd!" -Force)

- name: Start Playit and Set Up RDP Tunnel


env:
PLAYIT_AUTH_KEY: ${{ secrets.PL }}
run: |
Start-Process -FilePath "$env:USERPROFILE\playit.exe" -ArgumentList "--
secret $env:PLAYIT_AUTH_KEY" -NoNewWindow -Wait
Start-Process -FilePath "$env:USERPROFILE\playit.exe" -NoNewWindow

# Prevent workflow to stop


- name: Keep the GitHub Action Runner Alive
run: |
Start-Sleep -Seconds 11800 # Adjust the duration based on your needs

You might also like