Ever wonder what the Desktop of the Windows Runners on GitHub Actions looks like?
This functionality is like Appveyor's RDP functionality for their Windows workers:
https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
You need set secrets on settings → (NGROK or CF)
CF_DOMAINFor Cloudflare Custom Domain modeNGROK_AUTH_TOKENNeeded only for NGROK modeNGROK_REGIONNeeded only for NGROK mode (options:us,eu,ap,au,sa,jp,in)PASSWORDRDP passwordTG_CHAT_IDTelegram user id for get login urlTG_TOKENTelegram bot token for get message from bot
These steps should be useful for debugging broken builds directly on the build worker. Use this project as reference and toss the steps into your project after some failing part of the build for introspection.
- Go https://remotedesktop.google.com/headless and login if needed.
- Copy Powershell command that page.
- Go actions tab in your forked repo.
- Select
Chrome Remote Desktop - Trigger action with your desired 6 digit pin and paste command in step 1.
- Go again step 1 link in remote Support tab.
- When setup finished , you can see the machine in list , write your pin and connect.
- Enjoy! ☕
- When you're done introspecting, cancel the job.
- Get the tunnel auth token at: https://dashboard.ngrok.com/auth .
- Under the repository's settings, make a secrets called
NGROK_AUTH_TOKEN,NGROK_REGION,TG_TOKEN,TG_CHAT_IDandPASSWORD - Trigger a NGROK in actions page.
- Wait until the last step which will hang forever as it connects to ngrok and sets up the reverse tunnel.
- Wait from telegram bot to get url
- Connect to the host and port combination with your RDP client of choice.
- Use the username
runneradminand use thePASSWORDyou set in secrets - Enjoy! ☕
- When you're done introspecting, cancel the job.
- Download cloudflared.exe
- Under the repository's settings, make a secrets called
TG_TOKEN,TG_CHAT_IDandPASSWORD - Trigger a
cloudflaredin actions page. - Wait from telegram bot to get url and copy
- Open terminal/cmd and run this:
cloudflared-windows-amd64.exe access rdp --hostname url.from.telegram.bot --url localhost:portfromlocalYou can set any available port to
portfromlocal - Then open rdp connect program and run just
localhost:portfromlocal - Use the username
runneradminand use thePASSWORDyou set in secrets - TADAAAAA!!! low delay more performance ✈
- Download cloudflared.exe
- Under the repository's settings, make a secrets called
CF_DOMAIN,TG_TOKEN,TG_CHAT_IDandPASSWORD - Trigger a
cloudflared_loginin actions page. - Wait from telegram bot to get url
- Click link and login your Cloudflare account, Select your domain What you want to use
- Open terminal/cmd and run this:
cloudflared-windows-amd64.exe access rdp --hostname SUBDOMAIN.YOUR.CF.DOMAIN.HERE --url localhost:portfromlocalYou can set any available port to
portfromlocal - Then open rdp connect program and run just
localhost:portfromlocal - TADAAAAA!!! low delay more performance 🚀
- Runners can run jobs for up to 6 hours. So you have about 6 hours minus the minute setup time to poke around in these runners.
- If using for introspection, add the
continue-on-errorproperty to the failing step before these remote connection steps.
Maybe as a GitHub Action? Oh well, this is fairly simple anyway. Or using something more FOSS than ngrok like https://github.com/TimeToogo/tunshell ?
These projects also allow remote introspection of very temporary environments like in GitHub Actions or other environments.
- Shell-Only (macOS, Linux, and also Windows)
- macOS VNC
This repo based on Nelson Chen's reverse-rdp-windows-github-actions repo and much more developed by Kaan Dikeç and Muhammed Galip Uludağ
Thanks for c9ffin for chrome remote desktop idea
