-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1cc461b
commit 01b50ff
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Open with SSH | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
# push: | ||
# branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Try Build | ||
run: ./not-exist-file.sh it bloke build | ||
|
||
- 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_PASSWD }} | ||
|
||
- name: Don't kill instace | ||
if: ${{ failure() }} | ||
run: sleep 1h # Prevent to killing instance after failure |