breakpoint
namespacelabs/breakpoint is a GitHub action that allows you to pause the execution of a workflow, enter a live SSH session, debug the environment and finally resume the run when you are done.
Workflows that have active breakpoint sessions are still "running" and continue to count towards your total CI usage.
Example
jobs:
go-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Go tests
runs: |
go test ./...
- name: Breakpoint if tests failed
if: failure()
uses: namespacelabs/breakpoint-action@v0
with:
duration: 30m
authorized-users: jack123, alice321
When the above breakpoint
runs, you'll see a log message like the following:
┌───────────────────────────────────────────────────────────────────────────┐
│ │
│ Breakpoint running until 2023-05-24T16:06:48+02:00 (29 minutes from now). │
│ │
│ Connect with: ssh -p 40812 runner@rendezvous.namespace.so │
│ │
└───────────────────────────────────────────────────────────────────────────┘
The SSH service in breakpoint
only accepts sessions from public SSH keys configured by GitHub users, listed by authorized-users
.
And there you have it, an SSH session to connect to debug your workflow.
Check out the actions GitHub page for a more detailed documentation.