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
* Don't create /continue on macOS
* add connect-timeout variable
Signed-off-by: Dave Lee <[email protected]>
* run the build
Signed-off-by: Dave Lee <[email protected]>
* action.yml
Signed-off-by: Dave Lee <[email protected]>
* connect-timeout-seconds is a better name
Signed-off-by: Dave Lee <[email protected]>
* chore(deps): bump to use actions/checkout v4 (node20 runtime) (mxschmitt#197)
* chore(deps-dev): bump braces from 3.0.2 to 3.0.3 (mxschmitt#196)
* chore(deps-dev): bump micromatch from 4.0.5 to 4.0.8 (mxschmitt#201)
* Adding support for RHEL-based distributions
Signed-off-by: Loic Pottier <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
* chore(deps-dev): bump cross-spawn from 7.0.3 to 7.0.5 (mxschmitt#207)
* add new input msys2-location
add new msys2-location input and use instead of hardcoding c:\msys64
* Update README.md with new input
* Update index.js
* use msys2-location input in didTmateQuit and continueFileExists
* Offer `mxschmitt/action-tmate/detached` for convenience
The `mxschmitt/action-tmate/detached` Action does exactly the same as
the `mxschmitt/action-tmate` Action, except defaulting to detached mode.
This will come in handy in the increasingly many cases I seem to
experience of late where I want to use the detached mode without the
price of adding a `with` section.
Not a big price, but it accumulates.
Signed-off-by: Johannes Schindelin <[email protected]>
* README: document the `mxschmitt/action-tmate/detached` Action
This "sub-"Action merely switches the default to `detached: true`. Which
is so much more convenient than having to add a `with:` section _just_
for that mode.
Signed-off-by: Johannes Schindelin <[email protected]>
* ci(manual-detached-test): use the `./detached` "sub-Action"
Signed-off-by: Johannes Schindelin <[email protected]>
* ci(manual-detached-test): drop no-longer-needed setting
We now limit access to the actor by default, iff the actor has a public
SSH key registered in their GitHub profile.
Signed-off-by: Johannes Schindelin <[email protected]>
* ci(manual-test): stop mentioning the obsolete ubuntu-20.04 pool
It has gone to the ~Google~GitHub Graveyard.
Signed-off-by: Johannes Schindelin <[email protected]>
* Add support for output
* Add ssh to output
* (feature) Add outputs to detached action as well
* ci: verify that the `action.yml` files are in sync
In mxschmitt#218, I added a
convenient way to launch this Action in detached mode:
`mxschmitt/action-tmate/detached@v3`.
The way this is implemented is a copy/edited version of `action.yml` in
the `detached/` subdirectory.
This runs the danger of inadvertent divergences, as happened in
mxschmitt#221 (which I caught in
time and the contributor gracefully addressed).
Let's add automation not only to update the file easily but also to
cause a failure in the PR build with a helpful message suggesting how to
fix the problem.
Signed-off-by: Johannes Schindelin <[email protected]>
* detached/action.yml: synchronize with `action.yml`
There was a difference in whitespace, caught by the new step in
`checkin.yml`.
Signed-off-by: Johannes Schindelin <[email protected]>
* ci: fix 'Verify that the project is built'
The output of that step, if something goes wrong, claims that `dist/` is
not up to date, but the build product is in `lib/`.
Also, `git status -s` shows not only differences in the tracked files,
but also untracked files (which should not exist at that stage). Let's
avoid puzzling contributors when there are untracked files by logging
the output of `git status -s`.
Signed-off-by: Johannes Schindelin <[email protected]>
* ci(manual-test): update list of runner images
See https://github.com/actions/runner-images/blob/310e8e963731084df01bcbdbd5044a5ca7fc0c88/README.md#available-images.
* ci(manual-test): convert from a matrix job to a single job
With this change, the `manual-test` workflow accepts user input as to
what runner OS or Docker image to run on.
It is more useful this way, too, as I never encountered a situation
where I would want to run this Action on multiple runners, having to log
in concurrently into multiple tmate sessions, and I doubt that anyone
else has encountered that situation, either.
Signed-off-by: Johannes Schindelin <[email protected]>
* Add a node.js script to update manual-test's `runs-on` options
As I had suggested in
mxschmitt#224 (comment),
it would be good to have some sort of automation to update the
ever-changing list of runner pools that are supported by GitHub.
Signed-off-by: Johannes Schindelin <[email protected]>
* ci(manual-test): update `runs-on` options
Brought to you by the new `update-manual-test.js` script.
Signed-off-by: Johannes Schindelin <[email protected]>
* update-manual-test: special-case Windows/ARM64 runners
For a little more than two weeks, as of time of writing, there are
GitHub-hosted Windows/ARM64 runners (at long last!), announced here:
https://github.blog/changelog/2025-04-14-windows-arm64-hosted-runners-now-available-in-public-preview/
These are not yet listed in the `runner-images` README, therefore we
want to add them manually.
Signed-off-by: Johannes Schindelin <[email protected]>
* manual-test: install MSYS2 on Windows/ARM64
The Windows/ARM64 runners that are currently in public preview do not
have MSYS2 installed by default, so let's do that.
Signed-off-by: Johannes Schindelin <[email protected]>
---------
Signed-off-by: Dave Lee <[email protected]>
Signed-off-by: Loic Pottier <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Co-authored-by: Vadim Peretokin <[email protected]>
Co-authored-by: Dave Lee <[email protected]>
Co-authored-by: Johannes Schindelin <[email protected]>
Co-authored-by: Rui Chen <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Loic Pottier <[email protected]>
Co-authored-by: jeremyd2019 <[email protected]>
Co-authored-by: Max schwenk <[email protected]>
Co-authored-by: Yukai Chou <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+83-7Lines changed: 83 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ jobs:
33
33
build:
34
34
runs-on: self-hosted
35
35
steps:
36
-
- uses: actions/checkout@v3
36
+
- uses: actions/checkout@v4
37
37
- name: Setup tmate session
38
38
uses: canonical/action-tmate@main
39
39
```
@@ -91,7 +91,7 @@ jobs:
91
91
build:
92
92
runs-on: self-hosted
93
93
steps:
94
-
- uses: actions/checkout@v3
94
+
- uses: actions/checkout@v4
95
95
- name: Setup tmate session
96
96
uses: canonical/action-tmate@main
97
97
with:
@@ -100,6 +100,44 @@ jobs:
100
100
101
101
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.
102
102
103
+
As this mode has turned out to be so useful as to having the potential for being the default mode once time travel becomes available, it is also available as `mxschmitt/action-tmate/detached` for convenience.
104
+
105
+
### Using SSH command output in other jobs
106
+
107
+
When running in detached mode, the action sets the following outputs that can be used in subsequent steps or jobs:
108
+
109
+
- `ssh-command`: The SSH command to connect to the tmate session
110
+
- `ssh-address`: The raw SSH address without the "ssh" prefix
111
+
- `web-url`: The web URL to connect to the tmate session (if available)
112
+
113
+
Example workflow using the SSH command in another job:
# Send a Slack message to someone telling them they can ssh to ${{ needs.setup-tmate.outputs.ssh-address }}
139
+
```
140
+
103
141
## Without sudo
104
142
105
143
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.
@@ -111,7 +149,7 @@ jobs:
111
149
build:
112
150
runs-on: self-hosted
113
151
steps:
114
-
- uses: actions/checkout@v3
152
+
- uses: actions/checkout@v4
115
153
- name: Setup tmate session
116
154
uses: canonical/action-tmate@main
117
155
with:
@@ -129,7 +167,7 @@ jobs:
129
167
build:
130
168
runs-on: self-hosted
131
169
steps:
132
-
- uses: actions/checkout@v3
170
+
- uses: actions/checkout@v4
133
171
- name: Setup tmate session
134
172
uses: canonical/action-tmate@main
135
173
timeout-minutes: 15
@@ -148,7 +186,7 @@ jobs:
148
186
build:
149
187
runs-on: self-hosted
150
188
steps:
151
-
- uses: actions/checkout@v3
189
+
- uses: actions/checkout@v4
152
190
- name: Setup tmate session
153
191
if: ${{ failure() }}
154
192
uses: canonical/action-tmate@main
@@ -157,6 +195,26 @@ jobs:
157
195
{% endraw %}
158
196
-->
159
197
198
+
## Use registered public SSH key(s)
199
+
200
+
If [you have registered one or more public SSH keys with your GitHub profile](https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account), tmate will be started such that only those keys are authorized to connect, otherwise anybody can connect to the tmate session. If you want to require a public SSH key to be installed with the tmate session, no matter whether the user who started the workflow has registered any in their GitHub profile, you will need to configure the setting `limit-access-to-actor` to `true`, like so:
201
+
202
+
```yaml
203
+
name: CI
204
+
on: [push]
205
+
jobs:
206
+
build:
207
+
runs-on: ubuntu-latest
208
+
steps:
209
+
- uses: actions/checkout@v4
210
+
- name: Setup tmate session
211
+
uses: canonical/action-tmate@v3
212
+
with:
213
+
limit-access-to-actor: true
214
+
```
215
+
216
+
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> <tmate-connection-string>`.
217
+
160
218
## Use your own tmate servers
161
219
162
220
By default, this action uses environment variables to pick up tmate ssh configuration settings and
If you want to integrate with the msys2/setup-msys2 action or otherwise don't have an MSYS2 installation at `C:\msys64`, you can specify a different location for MSYS2:
If you want to continue a workflow and you are inside a tmate 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`.
260
+
If you want to continue a workflow and you are inside a tmate 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` (on Linux).
0 commit comments