Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ActionDebugger by [Warpbuild](https://warpbuild.com)
# ActionDebugger by [WarpBuild](https://warpbuild.com)

[![GitHub Marketplace](https://img.shields.io/badge/GitHub-Marketplace-green)]([https://github.com/marketplace/actions/gha-debug](https://github.com/marketplace/actions/actiondebugger-by-warpbuild))
[![GitHub Marketplace](https://img.shields.io/badge/GitHub-Marketplace-green)](<[https://github.com/marketplace/actions/gha-debug](https://github.com/marketplace/actions/actiondebugger-by-warpbuild)>)

This GitHub Action offers you a direct way to interact with the host system on which the actual scripts (Actions) will run.

Expand All @@ -26,9 +26,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup ssh session
uses: Warpbuilds/gha-debug@v1
- uses: actions/checkout@v3
- name: Setup ssh session
uses: Warpbuilds/gha-debug@v1
```

To get the connection string, just open the `Checks` tab in your Pull Request and scroll to the bottom. There you can connect either directly per SSH or via a web based terminal.
Expand Down Expand Up @@ -56,6 +56,7 @@ Then add an [`if`](https://docs.github.com/en/actions/reference/context-and-expr
<!--
{% raw %}
-->

```yaml
jobs:
build:
Expand All @@ -66,6 +67,7 @@ jobs:
uses: Warpbuilds/gha-debug@v1
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
```

<!--
{% endraw %}
-->
Expand All @@ -83,11 +85,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup interactive ssh session
uses: Warpbuilds/gha-debug@v1
with:
detached: true
- uses: actions/checkout@v3
- name: Setup interactive ssh session
uses: Warpbuilds/gha-debug@v1
with:
detached: true
```

By default, this mode will wait at the end of the job for a user to connect and then to terminate the ssh session. If no user has connected within 10 minutes after the post-job step started, it will terminate the `ssh` session and quit gracefully.
Expand All @@ -103,13 +105,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup interactive ssh session
uses: Warpbuilds/gha-debug@v1
timeout-minutes: 15
- uses: actions/checkout@v3
- name: Setup interactive ssh session
uses: Warpbuilds/gha-debug@v1
timeout-minutes: 15
```

## Only on failure

By default a failed step will cause all following steps to be skipped. You can specify that the ssh session only starts if a previous step [failed](https://docs.github.com/en/actions/learn-github-actions/expressions#failure).

```yaml
Expand All @@ -119,10 +122,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup interactive ssh session
if: ${{ failure() }}
uses: Warpbuilds/gha-debug@v1
- uses: actions/checkout@v3
- name: Setup interactive ssh session
if: ${{ failure() }}
uses: Warpbuilds/gha-debug@v1
```

## Use registered public SSH key(s)
Expand All @@ -136,16 +139,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup interactive ssh session
uses: Warpbuilds/gha-debug@v1
with:
limit-access-to-actor: true
- uses: actions/checkout@v3
- name: Setup interactive ssh session
uses: Warpbuilds/gha-debug@v1
with:
limit-access-to-actor: true
```

If the registered public SSH key is not your default private SSH key, you will need to specify the path manually, like so: `ssh -i <path-to-key> <ssh-connection-string>`.


## Continue a workflow

If you want to continue a workflow and you are inside an ssh session, just create a empty file with the name `continue` either in the root directory or in the project directory by running `touch continue` or `sudo touch /continue`.
Expand Down
54 changes: 27 additions & 27 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: 'ActionDebugger By Warpbuild'
description: 'Debug your GitHub Actions Environment interactively by using SSH or a Web shell'
name: "ActionDebugger By WarpBuild"
description: "Debug your GitHub Actions Environment interactively by using SSH or a Web shell"
branding:
icon: terminal
color: gray-dark
author: 'Warpbuild'
author: "WarpBuild"
runs:
using: 'node20'
main: 'lib/index.js'
post: 'lib/index.js'
post-if: '!cancelled()'
using: "node20"
main: "lib/index.js"
post: "lib/index.js"
post-if: "!cancelled()"
inputs:
sudo:
description: 'If apt should be executed with sudo or without'
description: "If apt should be executed with sudo or without"
required: false
default: 'auto'
default: "auto"
install-dependencies:
description: 'Whether or not to install dependencies on linux (openssh-client, xz-utils)'
description: "Whether or not to install dependencies on linux (openssh-client, xz-utils)"
required: false
default: 'true'
default: "true"
limit-access-to-actor:
description: 'Whether to authorize only the public SSH keys of the user triggering the workflow (defaults to true if the GitHub profile of the user has a public SSH key)'
description: "Whether to authorize only the public SSH keys of the user triggering the workflow (defaults to true if the GitHub profile of the user has a public SSH key)"
required: false
default: 'auto'
default: "auto"
detached:
description: 'In detached mode, the workflow job will continue while the ssh session is active'
description: "In detached mode, the workflow job will continue while the ssh session is active"
required: false
default: 'false'
default: "false"
tmate-server-host:
description: 'The hostname for your tmate server (e.g. ssh.example.org)'
description: "The hostname for your tmate server (e.g. ssh.example.org)"
required: false
default: 'gha.warp.build'
default: "gha.warp.build"
tmate-server-port:
description: 'The port for your tmate server (e.g. 2222)'
description: "The port for your tmate server (e.g. 2222)"
required: false
default: ''
default: ""
tmate-server-rsa-fingerprint:
description: 'The RSA fingerprint for your tmate server'
description: "The RSA fingerprint for your tmate server"
required: false
default: 'SHA256:xx8GG3NVyIlZRFvm+a0N8U3NVXCIZXMsOnes0ERRz1k'
default: "SHA256:xx8GG3NVyIlZRFvm+a0N8U3NVXCIZXMsOnes0ERRz1k"
tmate-server-ed25519-fingerprint:
description: 'The ed25519 fingerprint for your tmate server'
description: "The ed25519 fingerprint for your tmate server"
required: false
default: 'SHA256:+aWjAPAeKuvuZSPG92Q8yaEkd5eb2T+uF9Jp+8Sb/+A'
default: "SHA256:+aWjAPAeKuvuZSPG92Q8yaEkd5eb2T+uF9Jp+8Sb/+A"
github-token:
description: >
Personal access token (PAT) used to call into GitHub's REST API.
Expand All @@ -50,10 +50,10 @@ inputs:
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
default: ${{ github.token }}
named-session-name:
description: 'If populated, the session will be generated with a deterministic URL in the format of <username>/<named-sesison-name>@gha.warp.build'
description: "If populated, the session will be generated with a deterministic URL in the format of <username>/<named-sesison-name>@gha.warp.build"
required: false
default: ''
default: ""
named-session-api-key:
description: 'API Key required to create named session. Please contact support@warpbuilds.com to get one.'
description: "API Key required to create named session. Please contact support@warpbuilds.com to get one."
required: false
default: ''
default: ""
Loading