Guest User

Untitled

a guest
Jan 13th, 2025
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. name: Playit RDP Tunnel
  2.  
  3. on:
  4. workflow_dispatch:
  5.  
  6. jobs:
  7. setup-rdp-tunnel:
  8. runs-on: windows-latest
  9.  
  10. steps:
  11. - name: Check out the repository
  12. uses: actions/checkout@v2
  13.  
  14. - name: Download and Install Playit
  15. run: |
  16. 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"
  17. Start-Sleep -Seconds 5 # Give some time for the download to complete
  18.  
  19.  
  20. # Default, optional.
  21. - name: Enable TS
  22. run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
  23. - run: Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
  24. - run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1
  25. - run: Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "p@ssw0rd!" -Force)
  26.  
  27. - name: Start Playit and Set Up RDP Tunnel
  28. env:
  29. PLAYIT_AUTH_KEY: ${{ secrets.PL }}
  30. run: |
  31. Start-Process -FilePath "$env:USERPROFILE\playit.exe" -ArgumentList "--secret $env:PLAYIT_AUTH_KEY" -NoNewWindow -Wait
  32. Start-Process -FilePath "$env:USERPROFILE\playit.exe" -NoNewWindow
  33.  
  34.  
  35. # Prevent workflow to stop
  36. - name: Keep the GitHub Action Runner Alive
  37. run: |
  38. Start-Sleep -Seconds 11800 # Adjust the duration based on your needs
  39.  
  40.  
Advertisement
Add Comment
Please, Sign In to add comment