- Store
action.yml
into.github/actions/debugviassh/action.yml
- Add your ngrok.com token in an env var
NGROK_TOKEN
- Add your public ssh key in another env var
SSH_PUBLIC_KEY
- Add the action call in your workflow where you want to stop and get ssh access
- Find host/port to connect in https://dashboard.ngrok.com/cloud-edge/endpoints
- ssh -l runner -p $ngrok_port $ngrok_host
note:
- eventually resolve manually the ngrok dns if it's blocked using dig
dig -t A $ngrokhost +short @1.1.1.1
- ssh username is
runner
on official runner or could be anything like ubuntu,debian,etc on self hosted
source (wasn't working out of the box): https://github.com/marketplace/actions/ssh-tunnel-over-ngrok
- name: Setup SSH tunnel
uses: "./.github/actions/debugviassh"
with:
timeout: 2h
ssh_public_key: ${{ secrets.SSH_PUBLIC_KEY }}
ngrok_token: ${{ secrets.NGROK_TOKEN }}