You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,26 @@ jobs:
74
74
75
75
You can then [manually run a workflow](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow) on the desired branch and set `debug_enabled` to true to get a debug session.
76
76
77
+
## Detached mode
78
+
79
+
By default, this Action starts a `tmate` session and waits for the session to be done (typically by way of a user connecting and exiting the shell after debugging). In detached mode, this Action will start the `tmate` session, print the connection details, and continue with the next step(s) of the workflow's job. At the end of the job, the Action will wait for the session to exit.
80
+
81
+
```yaml
82
+
name: CI
83
+
on: [push]
84
+
jobs:
85
+
build:
86
+
runs-on: ubuntu-latest
87
+
steps:
88
+
- uses: actions/checkout@v3
89
+
- name: Setup tmate session
90
+
uses: mxschmitt/action-tmate@v3
91
+
with:
92
+
detached: true
93
+
```
94
+
95
+
By default, this mode will wait at the end of the job for a user to connect and then to terminate the tmate session. If no user has connected within 10 minutes after the post-job step started, it will terminate the `tmate` session and quit gracefully.
96
+
77
97
## Without sudo
78
98
79
99
By default we run installation commands using sudo on Linux. If you get `sudo: not found` you can use the parameter below to execute the commands directly.
Copy file name to clipboardExpand all lines: action.yml
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ author: 'Max Schmitt'
6
6
runs:
7
7
using: 'node16'
8
8
main: 'lib/index.js'
9
+
post: 'lib/index.js'
10
+
post-if: '!cancelled()'
9
11
inputs:
10
12
sudo:
11
13
description: 'If apt should be executed with sudo or without'
@@ -19,6 +21,10 @@ inputs:
19
21
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)'
20
22
required: false
21
23
default: 'auto'
24
+
detached:
25
+
description: 'In detached mode, the workflow job will continue while the tmate session is active'
26
+
required: false
27
+
default: 'false'
22
28
tmate-server-host:
23
29
description: 'The hostname for your tmate server (e.g. ssh.example.org)'
0 commit comments