Skip to content

Instantly share code, notes, and snippets.

@b6pzeusbc54tvhw5jgpyw8pwz2x6gs
Last active August 15, 2020 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b6pzeusbc54tvhw5jgpyw8pwz2x6gs/f20acbd1b30042a4752d79eac46be0ca to your computer and use it in GitHub Desktop.
Save b6pzeusbc54tvhw5jgpyw8pwz2x6gs/f20acbd1b30042a4752d79eac46be0ca to your computer and use it in GitHub Desktop.
GitHub Actions debugging with ssh
# https://dev.to/retyui/how-debugging-github-actions-with-ssh-273n?a=github_community
- name: Start SSH via Ngrok
if: ${{ failure() }}
run: curl -sL https://gist.githubusercontent.com/retyui/7115bb6acf151351a143ec8f96a7c561/raw/7099b9db76729dc5761da72aa8525f632d8875c9/debug-github-actions.sh | bash
env:
# After sign up on the https://ngrok.com/
# You can find this token here: https://dashboard.ngrok.com/get-started/setup
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
# This password you will use when authorizing via SSH
USER_PASS: ${{ secrets.NGROK_SSH_USER_PASS }}
- name: Don't kill instance
if: ${{ failure() }}
run: sleep 10m # Prevent to killing instance after failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment