Sometimes it is useful to have full access to macOS aqua session on github actions runner, for example to debug UI tests.
ngrok account - free signup https://ngrok.com
save your authtoken from https://dashboard.ngrok.com/get-started/your-authtoken
we will refer to it as <NGROK_AUTH_TOKEN>
below
- add tmate step to your github workflow, see https://github.com/marketplace/actions/debugging-with-tmate
- name: Debugging with tmate
uses: mxschmitt/[email protected]
- launch workflow and wait for tmate action to print ssh command to the log output
- login via ssh to the action runner by executing the above command, e.g.
ssh [email protected]
brew install ngrok
ngrok authtoken <NGROK_AUTH_TOKEN>
replace with your ngrok token- notice ngrok runs successfully and prints tcp connection string, e.g.
tcp://8.tcp.ngrok.io:19482
Session Status online
Version 2.3.40
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding tcp://8.tcp.ngrok.io:19482 -> localhost:5900
Press Ctrl-B
then %
sudo passwd
set root password to something likepassword
- allow screen share connections
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -allowAccessFor -allUsers -privs -all -clientopts -setmenuextra -menuextra yes
- set screen resolution
/Library/Application\ Support/VMware\ Tools/vmware-resolutionSet 1920 1080
open vnc://8.tcp.ngrok.io:19482
open screen share replacing connection string with above from ngrok
login with username root
, use above set password, e.g. password
Cancel github runner workflow. It will recycle runner's instance closing Screen Share connection and tmate session.