From 3ee22d49a99b9433c433cda9d4759fd2d5cef4aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:18:18 +0200 Subject: [PATCH 01/37] chore(deps-dev): bump @babel/traverse from 7.22.11 to 7.23.2 (#180) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.11 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 148 +++++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e1794ca..02aa63e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -152,12 +152,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.22.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -263,22 +263,22 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -440,9 +440,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -500,9 +500,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.14", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.14.tgz", - "integrity": "sha512-1KucTHgOvaw/LzCVrEOAyXkr9rQlp0A1HiHRYnSUE9dmb8PvPW7o5sscg+5169r54n3vGlbx6GevTE/Iw/P3AQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1731,33 +1731,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", - "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.11", - "@babel/types": "^7.22.11", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1766,13 +1766,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", - "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -6821,12 +6821,12 @@ } }, "@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.22.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -6905,19 +6905,19 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { @@ -7031,9 +7031,9 @@ "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -7076,9 +7076,9 @@ } }, "@babel/parser": { - "version": "7.22.14", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.14.tgz", - "integrity": "sha512-1KucTHgOvaw/LzCVrEOAyXkr9rQlp0A1HiHRYnSUE9dmb8PvPW7o5sscg+5169r54n3vGlbx6GevTE/Iw/P3AQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { @@ -7897,42 +7897,42 @@ } }, "@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", - "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.11", - "@babel/types": "^7.22.11", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", - "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, From 267c486fda6803010dcfa1171057d5105abee9c0 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Thu, 23 Nov 2023 03:14:09 +0800 Subject: [PATCH 02/37] docs: fix Jekyll formatting of another code block (#183) Similar to change proposed in #79. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 3704f75e..e6719dec 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,9 @@ jobs: ## Only on failure By default a failed step will cause all following steps to be skipped. You can specify that the tmate session only starts if a previous step [failed](https://docs.github.com/en/actions/learn-github-actions/expressions#failure). + ```yaml name: CI on: [push] @@ -144,6 +147,9 @@ jobs: if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 ``` + ## Use registered public SSH key(s) From 960bb4532c376c3df441b7f58b7ba99be4081c8f Mon Sep 17 00:00:00 2001 From: Vadim Peretokin Date: Tue, 26 Dec 2023 20:58:13 +0100 Subject: [PATCH 03/37] Don't create /continue on macOS --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e6719dec..ddf16b4c 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ jobs: ## Continue a workflow -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`. +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). ## Connection string / URL is not visible From 5f7991169d14f511fcb6c26a203092fc32015c54 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 11 Apr 2024 13:51:03 -0400 Subject: [PATCH 04/37] add connect-timeout variable Signed-off-by: Dave Lee --- .github/workflows/manual-detached-test.yml | 1 + src/index.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual-detached-test.yml b/.github/workflows/manual-detached-test.yml index a623483f..fd084c46 100644 --- a/.github/workflows/manual-detached-test.yml +++ b/.github/workflows/manual-detached-test.yml @@ -10,6 +10,7 @@ jobs: with: limit-access-to-actor: true detached: true + connect-timeout: 60 - run: | echo "A busy loop" for value in $(seq 10) diff --git a/src/index.js b/src/index.js index 2b102b82..ec918536 100644 --- a/src/index.js +++ b/src/index.js @@ -49,7 +49,13 @@ export async function run() { && '0' !== await execShellCommand(`${tmate} display -p '#{tmate_num_clients}'`, { quiet: true }) } })() - for (let seconds = 10 * 60; seconds > 0; ) { + + let connectTimeoutSeconds = parseInt(core.getInput("connect-timeout")) + if (Number.isNaN(connectTimeoutSeconds) || connectTimeoutSeconds <= 0) { + connectTimeoutSeconds = 10 * 60 + } + + for (let seconds = connectTimeoutSeconds; seconds > 0; ) { console.log(`${ await hasAnyoneConnectedYet() ? 'Waiting for session to end' From 4d73cfda2d1ce96fcb4b67ef36c7b495e220dd72 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 11 Apr 2024 13:54:29 -0400 Subject: [PATCH 05/37] run the build Signed-off-by: Dave Lee --- lib/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index f69f26c6..1b3db339 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17435,7 +17435,13 @@ async function run() { && '0' !== await execShellCommand(`${tmate} display -p '#{tmate_num_clients}'`, { quiet: true }) } })() - for (let seconds = 10 * 60; seconds > 0; ) { + + let connectTimeoutSeconds = parseInt(core.getInput("connect-timeout")) + if (Number.isNaN(connectTimeoutSeconds) || connectTimeoutSeconds <= 0) { + connectTimeoutSeconds = 10 * 60 + } + + for (let seconds = connectTimeoutSeconds; seconds > 0; ) { console.log(`${ await hasAnyoneConnectedYet() ? 'Waiting for session to end' From 90ffb18ca9ccdf1a34f30c195cfc0cc708e71626 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 11 Apr 2024 13:57:54 -0400 Subject: [PATCH 06/37] action.yml Signed-off-by: Dave Lee --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index 8a691e7b..3dc5115f 100644 --- a/action.yml +++ b/action.yml @@ -25,6 +25,10 @@ inputs: description: 'In detached mode, the workflow job will continue while the tmate session is active' required: false default: 'false' + connect-timeout: + description: 'How long in seconds to wait for a connection to be established' + required: false + default: '600' tmate-server-host: description: 'The hostname for your tmate server (e.g. ssh.example.org)' required: false From 7cf1b970afe36fd163eba2e1b6041f7e5056e312 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Fri, 12 Apr 2024 09:49:22 -0400 Subject: [PATCH 07/37] connect-timeout-seconds is a better name Signed-off-by: Dave Lee --- .github/workflows/manual-detached-test.yml | 2 +- action.yml | 2 +- lib/index.js | 2 +- src/index.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/manual-detached-test.yml b/.github/workflows/manual-detached-test.yml index fd084c46..50751cea 100644 --- a/.github/workflows/manual-detached-test.yml +++ b/.github/workflows/manual-detached-test.yml @@ -10,7 +10,7 @@ jobs: with: limit-access-to-actor: true detached: true - connect-timeout: 60 + connect-timeout-seconds: 60 - run: | echo "A busy loop" for value in $(seq 10) diff --git a/action.yml b/action.yml index 3dc5115f..ee378345 100644 --- a/action.yml +++ b/action.yml @@ -25,7 +25,7 @@ inputs: description: 'In detached mode, the workflow job will continue while the tmate session is active' required: false default: 'false' - connect-timeout: + connect-timeout-seconds: description: 'How long in seconds to wait for a connection to be established' required: false default: '600' diff --git a/lib/index.js b/lib/index.js index 1b3db339..e3287714 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17436,7 +17436,7 @@ async function run() { } })() - let connectTimeoutSeconds = parseInt(core.getInput("connect-timeout")) + let connectTimeoutSeconds = parseInt(core.getInput("connect-timeout-seconds")) if (Number.isNaN(connectTimeoutSeconds) || connectTimeoutSeconds <= 0) { connectTimeoutSeconds = 10 * 60 } diff --git a/src/index.js b/src/index.js index ec918536..7c74b0a9 100644 --- a/src/index.js +++ b/src/index.js @@ -50,7 +50,7 @@ export async function run() { } })() - let connectTimeoutSeconds = parseInt(core.getInput("connect-timeout")) + let connectTimeoutSeconds = parseInt(core.getInput("connect-timeout-seconds")) if (Number.isNaN(connectTimeoutSeconds) || connectTimeoutSeconds <= 0) { connectTimeoutSeconds = 10 * 60 } From 43767ec126ce819b2c3e6ac57a8951a7833e4ad7 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 13 Jun 2024 03:11:45 -0400 Subject: [PATCH 08/37] chore(deps): bump to use actions/checkout v4 (node20 runtime) (#197) --- .github/workflows/checkin.yml | 2 +- .github/workflows/manual-detached-test.yml | 2 +- .github/workflows/manual-test.yml | 4 ++-- README.md | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index fe74feb7..239be138 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v3 with: diff --git a/.github/workflows/manual-detached-test.yml b/.github/workflows/manual-detached-test.yml index 50751cea..d4f37de1 100644 --- a/.github/workflows/manual-detached-test.yml +++ b/.github/workflows/manual-detached-test.yml @@ -5,7 +5,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./ with: limit-access-to-actor: true diff --git a/.github/workflows/manual-test.yml b/.github/workflows/manual-test.yml index bf1b27bd..eaa876c6 100644 --- a/.github/workflows/manual-test.yml +++ b/.github/workflows/manual-test.yml @@ -18,7 +18,7 @@ jobs: - false runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./ with: limit-access-to-actor: ${{ matrix.limit-access-to-actor }} @@ -37,7 +37,7 @@ jobs: container: image: ${{ matrix.container-runs-on }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./ with: limit-access-to-actor: ${{ matrix.limit-access-to-actor }} diff --git a/README.md b/README.md index e6719dec..b63ac9d7 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 ``` @@ -85,7 +85,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 with: @@ -105,7 +105,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 with: @@ -123,7 +123,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 timeout-minutes: 15 @@ -142,7 +142,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup tmate session if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 @@ -162,7 +162,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 with: @@ -182,7 +182,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 with: From 88154b3e4e4b6c9bfa67188061de14c2d643f47b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 22:00:24 +0200 Subject: [PATCH 09/37] chore(deps-dev): bump braces from 3.0.2 to 3.0.3 (#196) --- package-lock.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 02aa63e9..17b38839 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3220,12 +3220,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -3647,9 +3647,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -9079,12 +9079,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browserslist": { @@ -9376,9 +9376,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" From c85bfb7594cb615a0195080b639e036b013d101c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:56:22 +0200 Subject: [PATCH 10/37] chore(deps-dev): bump micromatch from 4.0.5 to 4.0.8 (#201) --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 17b38839..dd1322c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5751,12 +5751,12 @@ "dev": true }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -10936,12 +10936,12 @@ "dev": true }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, From 88e8ba74b81ef28b716dd572165957dd747847ff Mon Sep 17 00:00:00 2001 From: Loic Pottier Date: Thu, 10 Oct 2024 10:43:29 -0700 Subject: [PATCH 11/37] Adding support for RHEL-based distributions Signed-off-by: Loic Pottier Signed-off-by: Johannes Schindelin --- lib/index.js | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index e3287714..89855112 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17482,7 +17482,7 @@ async function run() { } else if (distro === "arch") { // partial upgrades are not supported so also upgrade everything await execShellCommand(optionalSudoPrefix + 'pacman -Syu --noconfirm xz openssh'); - } else if (distro === "fedora") { + } else if (distro === "fedora" || distro === "centos" || distro === "rhel" || distro === "almalinux") { await execShellCommand(optionalSudoPrefix + 'dnf install -y xz openssh'); } else { await execShellCommand(optionalSudoPrefix + 'apt-get update'); diff --git a/src/index.js b/src/index.js index 7c74b0a9..76854622 100644 --- a/src/index.js +++ b/src/index.js @@ -96,7 +96,7 @@ export async function run() { } else if (distro === "arch") { // partial upgrades are not supported so also upgrade everything await execShellCommand(optionalSudoPrefix + 'pacman -Syu --noconfirm xz openssh'); - } else if (distro === "fedora") { + } else if (distro === "fedora" || distro === "centos" || distro === "rhel" || distro === "almalinux") { await execShellCommand(optionalSudoPrefix + 'dnf install -y xz openssh'); } else { await execShellCommand(optionalSudoPrefix + 'apt-get update'); From cfc7cae0d7e0f544bfb4bdf5a9952d9602c076c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2024 17:16:37 +0100 Subject: [PATCH 12/37] chore(deps-dev): bump cross-spawn from 7.0.3 to 7.0.5 (#207) --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index dd1322c2..063debbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3434,9 +3434,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -9224,9 +9224,9 @@ } }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "dev": true, "requires": { "path-key": "^3.1.0", From c25b2ceae093efc82c855681b49b66319b78033f Mon Sep 17 00:00:00 2001 From: jeremyd2019 Date: Fri, 18 Apr 2025 13:20:18 -0700 Subject: [PATCH 13/37] add new input msys2-location add new msys2-location input and use instead of hardcoding c:\msys64 --- action.yml | 6 +++++- src/helpers.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index ee378345..65dad616 100644 --- a/action.yml +++ b/action.yml @@ -45,10 +45,14 @@ inputs: description: 'The ed25519 fingerprint for your tmate server' required: false default: '' + msys2-location: + description: 'The root of the MSYS2 installation (on Windows runners)' + required: false + default: 'C:\msys64' github-token: description: > Personal access token (PAT) used to call into GitHub's REST API. We recommend using a service account with the least permissions necessary. Also when generating a new PAT, select the least scopes necessary. [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 }} \ No newline at end of file + default: ${{ github.token }} diff --git a/src/helpers.js b/src/helpers.js index 6660c822..7a53b849 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -28,7 +28,7 @@ export const execShellCommand = (cmd, options) => { HOMEBREW_GITHUB_API_TOKEN: core.getInput('github-token') || undefined } }) : - spawn("C:\\msys64\\usr\\bin\\bash.exe", ["-lc", cmd], { + spawn(`${core.getInput("msys2-location") || "C:\\msys64"}\\usr\\bin\\bash.exe`, ["-lc", cmd], { env: { ...process.env, "MSYS2_PATH_TYPE": "inherit", /* Inherit previous path */ From 21a56295cdac298f0f6ed147d1708fcdd28185a0 Mon Sep 17 00:00:00 2001 From: jeremyd2019 Date: Fri, 18 Apr 2025 13:28:09 -0700 Subject: [PATCH 14/37] Update README.md with new input --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index e80efd71..734f6fbf 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,24 @@ jobs: install-dependencies: false ``` +## Use a different MSYS2 location + +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: + +```yaml +name: CI +on: [push] +jobs: + build: + runs-on: windows-latest + steps: + - uses: msys2/setup-msys2@v2 + id: setup-msys2 + - uses: mxschmitt/action-tmate@v3 + with: + msys2-location: ${{ steps.setup-msys2.outputs.msys2-location }} +``` + ## Continue a workflow 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). From e8c2820adad14296443932400c7b0bdb3b05ed53 Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Fri, 18 Apr 2025 13:32:24 -0700 Subject: [PATCH 15/37] Update index.js --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 89855112..916ad119 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17329,7 +17329,7 @@ const execShellCommand = (cmd, options) => { HOMEBREW_GITHUB_API_TOKEN: core.getInput('github-token') || undefined } }) : - (0,external_child_process_.spawn)("C:\\msys64\\usr\\bin\\bash.exe", ["-lc", cmd], { + (0,external_child_process_.spawn)(`${core.getInput("msys2-location") || "C:\\msys64"}\\usr\\bin\\bash.exe`, ["-lc", cmd], { env: { ...process.env, "MSYS2_PATH_TYPE": "inherit", /* Inherit previous path */ From 0c00209ecb7d039a0942971298888aa285844ef9 Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Fri, 18 Apr 2025 13:43:20 -0700 Subject: [PATCH 16/37] use msys2-location input in didTmateQuit and continueFileExists --- lib/index.js | 4 ++-- src/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index 916ad119..574bd0cc 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17638,12 +17638,12 @@ async function run() { } function didTmateQuit() { - const tmateSocketPath = process.platform === "win32" ? "C:/msys64/tmp/tmate.sock" : "/tmp/tmate.sock" + const tmateSocketPath = process.platform === "win32" ? `${core.getInput("msys2-location") || "C:\\msys64"}/tmp/tmate.sock` : "/tmp/tmate.sock" return !external_fs_default().existsSync(tmateSocketPath) } function continueFileExists() { - const continuePath = process.platform === "win32" ? "C:/msys64/continue" : "/continue" + const continuePath = process.platform === "win32" ? `${core.getInput("msys2-location") || "C:\\msys64"}/continue` : "/continue" return external_fs_default().existsSync(continuePath) || external_fs_default().existsSync(external_path_default().join(process.env.GITHUB_WORKSPACE, "continue")) } diff --git a/src/index.js b/src/index.js index 76854622..2b0285b2 100644 --- a/src/index.js +++ b/src/index.js @@ -252,11 +252,11 @@ export async function run() { } function didTmateQuit() { - const tmateSocketPath = process.platform === "win32" ? "C:/msys64/tmp/tmate.sock" : "/tmp/tmate.sock" + const tmateSocketPath = process.platform === "win32" ? `${core.getInput("msys2-location") || "C:\\msys64"}/tmp/tmate.sock` : "/tmp/tmate.sock" return !fs.existsSync(tmateSocketPath) } function continueFileExists() { - const continuePath = process.platform === "win32" ? "C:/msys64/continue" : "/continue" + const continuePath = process.platform === "win32" ? `${core.getInput("msys2-location") || "C:\\msys64"}/continue` : "/continue" return fs.existsSync(continuePath) || fs.existsSync(path.join(process.env.GITHUB_WORKSPACE, "continue")) } From 939a91aefb78c3469a0f526a8b03d013a30ff25a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 19 Apr 2025 19:28:10 +0200 Subject: [PATCH 17/37] 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 --- detached/action.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 detached/action.yml diff --git a/detached/action.yml b/detached/action.yml new file mode 100644 index 00000000..1f917a7c --- /dev/null +++ b/detached/action.yml @@ -0,0 +1,59 @@ +name: 'Debugging with tmate' +description: 'Debug your GitHub Actions Environment interactively by using SSH or a Web shell' +branding: + icon: terminal +author: 'Max Schmitt' +runs: + 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' + required: false + default: 'auto' + install-dependencies: + description: 'Whether or not to install dependencies for tmate on linux (openssh-client, xz-utils)' + required: false + 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)' + required: false + default: 'auto' + detached: + description: 'In detached mode, the workflow job will continue while the tmate session is active' + required: false + default: 'true' + connect-timeout-seconds: + description: 'How long in seconds to wait for a connection to be established' + required: false + default: '600' + tmate-server-host: + description: 'The hostname for your tmate server (e.g. ssh.example.org)' + required: false + default: '' + tmate-server-port: + description: 'The port for your tmate server (e.g. 2222)' + required: false + default: '' + tmate-server-rsa-fingerprint: + description: 'The RSA fingerprint for your tmate server' + required: false + default: '' + tmate-server-ed25519-fingerprint: + description: 'The ed25519 fingerprint for your tmate server' + required: false + default: '' + msys2-location: + description: 'The root of the MSYS2 installation (on Windows runners)' + required: false + default: 'C:\msys64' + github-token: + description: > + Personal access token (PAT) used to call into GitHub's REST API. + We recommend using a service account with the least permissions necessary. + Also when generating a new PAT, select the least scopes necessary. + [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 }} + From 47b6a8b65091c3916333892b007fa25086794c55 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 19 Apr 2025 19:32:08 +0200 Subject: [PATCH 18/37] 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 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 734f6fbf..bddebb39 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,8 @@ jobs: 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. +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. + ## Without sudo 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. From 19351d0d7a99e0f329105ddc23c76d89a162bf34 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 19 Apr 2025 19:36:42 +0200 Subject: [PATCH 19/37] ci(manual-detached-test): use the `./detached` "sub-Action" Signed-off-by: Johannes Schindelin --- .github/workflows/manual-detached-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/manual-detached-test.yml b/.github/workflows/manual-detached-test.yml index d4f37de1..5cc190ad 100644 --- a/.github/workflows/manual-detached-test.yml +++ b/.github/workflows/manual-detached-test.yml @@ -6,10 +6,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./ + - uses: ./detached with: limit-access-to-actor: true - detached: true connect-timeout-seconds: 60 - run: | echo "A busy loop" From 7eae436e98a6416451852637d8b0ea34f48c66e2 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 19 Apr 2025 19:36:42 +0200 Subject: [PATCH 20/37] 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 --- .github/workflows/manual-detached-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/manual-detached-test.yml b/.github/workflows/manual-detached-test.yml index 5cc190ad..f3efbf90 100644 --- a/.github/workflows/manual-detached-test.yml +++ b/.github/workflows/manual-detached-test.yml @@ -8,7 +8,6 @@ jobs: - uses: actions/checkout@v4 - uses: ./detached with: - limit-access-to-actor: true connect-timeout-seconds: 60 - run: | echo "A busy loop" From 045615d9288fc32d7f4e3e1f8770ab58dd032405 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 19 Apr 2025 19:35:04 +0200 Subject: [PATCH 21/37] ci(manual-test): stop mentioning the obsolete ubuntu-20.04 pool It has gone to the ~Google~GitHub Graveyard. Signed-off-by: Johannes Schindelin --- .github/workflows/manual-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-test.yml b/.github/workflows/manual-test.yml index eaa876c6..e78184a9 100644 --- a/.github/workflows/manual-test.yml +++ b/.github/workflows/manual-test.yml @@ -7,8 +7,8 @@ jobs: fail-fast: false matrix: runs-on: - - ubuntu-20.04 - ubuntu-22.04 + - ubuntu-24.04 - macos-11.0 - macos-12.0 - windows-2019 From f1ae2499303332381f4a84f405a7e263f15b62f3 Mon Sep 17 00:00:00 2001 From: Max schwenk Date: Tue, 29 Apr 2025 21:14:57 -0400 Subject: [PATCH 22/37] Add support for output --- README.md | 35 +++++++++++++++++++++++++++++++++++ action.yml | 6 ++++++ lib/index.js | 7 +++++++ src/index.js | 7 +++++++ 4 files changed, 55 insertions(+) diff --git a/README.md b/README.md index bddebb39..04a90b34 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,41 @@ By default, this mode will wait at the end of the job for a user to connect and 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. +### Using SSH command output in other jobs + +When running in detached mode, the action sets the following outputs that can be used in subsequent steps or jobs: + +- `ssh-command`: The SSH command to connect to the tmate session +- `web-url`: The web URL to connect to the tmate session (if available) + +Example workflow using the SSH command in another job: + +```yaml +name: Debug with tmate +on: [push] +jobs: + setup-tmate: + runs-on: ubuntu-latest + outputs: + ssh-command: ${{ steps.tmate.outputs.ssh-command }} + steps: + - uses: actions/checkout@v4 + - name: Setup tmate session + id: tmate + uses: mxschmitt/action-tmate@v3 + with: + detached: true + + use-ssh-command: + needs: setup-tmate + runs-on: ubuntu-latest + steps: + - name: Display SSH command + run: | + echo "Connect to the tmate session with:" + echo ${{ needs.setup-tmate.outputs.ssh-command }} +``` + ## Without sudo 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. diff --git a/action.yml b/action.yml index 65dad616..acd10143 100644 --- a/action.yml +++ b/action.yml @@ -56,3 +56,9 @@ inputs: Also when generating a new PAT, select the least scopes necessary. [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 }} + +outputs: + ssh-command: + description: 'The SSH command to connect to the tmate session (only set when detached mode is enabled)' + web-url: + description: 'The web URL to connect to the tmate session (only set when detached mode is enabled and web URL is available)' diff --git a/lib/index.js b/lib/index.js index 574bd0cc..dc414ece 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17602,6 +17602,13 @@ async function run() { } core.saveState('message', message) core.saveState('tmate', tmate) + + // Set the SSH command as an output so other jobs can use it + core.setOutput('ssh-command', tmateSSH) + if (tmateWeb) { + core.setOutput('web-url', tmateWeb) + } + console.log(message) return } diff --git a/src/index.js b/src/index.js index 2b0285b2..780aae7c 100644 --- a/src/index.js +++ b/src/index.js @@ -216,6 +216,13 @@ export async function run() { } core.saveState('message', message) core.saveState('tmate', tmate) + + // Set the SSH command as an output so other jobs can use it + core.setOutput('ssh-command', tmateSSH) + if (tmateWeb) { + core.setOutput('web-url', tmateWeb) + } + console.log(message) return } From cad616539f2ce80833694fe0f4a8c608b050a3d5 Mon Sep 17 00:00:00 2001 From: Max schwenk Date: Tue, 29 Apr 2025 22:26:49 -0400 Subject: [PATCH 23/37] Add ssh to output --- README.md | 5 +++-- action.yml | 2 ++ lib/index.js | 2 ++ src/index.js | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 04a90b34..5fe0877f 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ As this mode has turned out to be so useful as to having the potential for being When running in detached mode, the action sets the following outputs that can be used in subsequent steps or jobs: - `ssh-command`: The SSH command to connect to the tmate session +- `ssh-address`: The raw SSH address without the "ssh" prefix - `web-url`: The web URL to connect to the tmate session (if available) Example workflow using the SSH command in another job: @@ -113,6 +114,7 @@ jobs: runs-on: ubuntu-latest outputs: ssh-command: ${{ steps.tmate.outputs.ssh-command }} + ssh-address: ${{ steps.tmate.outputs.ssh-address }} steps: - uses: actions/checkout@v4 - name: Setup tmate session @@ -127,8 +129,7 @@ jobs: steps: - name: Display SSH command run: | - echo "Connect to the tmate session with:" - echo ${{ needs.setup-tmate.outputs.ssh-command }} + # Send a Slack message to someone telling them they can ssh to ${{ needs.setup-tmate.outputs.ssh-address }} ``` ## Without sudo diff --git a/action.yml b/action.yml index acd10143..c2f26022 100644 --- a/action.yml +++ b/action.yml @@ -60,5 +60,7 @@ inputs: outputs: ssh-command: description: 'The SSH command to connect to the tmate session (only set when detached mode is enabled)' + ssh-address: + description: 'The raw SSH address without the "ssh" prefix (only set when detached mode is enabled)' web-url: description: 'The web URL to connect to the tmate session (only set when detached mode is enabled and web URL is available)' diff --git a/lib/index.js b/lib/index.js index dc414ece..e3e3e8ae 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17605,6 +17605,8 @@ async function run() { // Set the SSH command as an output so other jobs can use it core.setOutput('ssh-command', tmateSSH) + // Extract and set the raw SSH address (without the "ssh" prefix) + core.setOutput('ssh-address', tmateSSH.replace(/^ssh /, '')) if (tmateWeb) { core.setOutput('web-url', tmateWeb) } diff --git a/src/index.js b/src/index.js index 780aae7c..06ab3437 100644 --- a/src/index.js +++ b/src/index.js @@ -219,6 +219,8 @@ export async function run() { // Set the SSH command as an output so other jobs can use it core.setOutput('ssh-command', tmateSSH) + // Extract and set the raw SSH address (without the "ssh" prefix) + core.setOutput('ssh-address', tmateSSH.replace(/^ssh /, '')) if (tmateWeb) { core.setOutput('web-url', tmateWeb) } From fda7fb352b897ca413a6bb8f19351357549879e4 Mon Sep 17 00:00:00 2001 From: Max schwenk Date: Wed, 30 Apr 2025 09:23:19 -0400 Subject: [PATCH 24/37] (feature) Add outputs to detached action as well --- detached/action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/detached/action.yml b/detached/action.yml index 1f917a7c..7121ff64 100644 --- a/detached/action.yml +++ b/detached/action.yml @@ -57,3 +57,11 @@ 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 }} +outputs: + ssh-command: + description: 'The SSH command to connect to the tmate session (only set when detached mode is enabled)' + ssh-address: + description: 'The raw SSH address without the "ssh" prefix (only set when detached mode is enabled)' + web-url: + description: 'The web URL to connect to the tmate session (only set when detached mode is enabled and web URL is available)' + From 10acb043f28a32d9a035648cf8faf68b58cdca79 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 1 May 2025 18:35:28 +0200 Subject: [PATCH 25/37] ci: verify that the `action.yml` files are in sync In https://github.com/mxschmitt/action-tmate/pull/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 https://github.com/mxschmitt/action-tmate/pull/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 --- .github/workflows/checkin.yml | 8 ++++++++ package.json | 1 + 2 files changed, 9 insertions(+) diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index 239be138..8b02f737 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -13,6 +13,14 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 + - name: Verify that action.yml files are in sync + run: | + npm run update-detached-action.yml && + if ! git diff --exit-code \*action.yml + then + echo '::error::action.yml files are not in sync, maybe run `npm run update-detached-action.yml`?' + exit 1 + fi - name: Install dependencies run: npm ci - name: Run tests diff --git a/package.json b/package.json index 7aa60e75..94c447ce 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "start": "node src/index.js", "build": "ncc build src/main.js -o lib", + "update-detached-action.yml": "sed '/^runs:$/{N;N;N;s/lib\\//..\\/&/g;};/^ detached:/{N;N;N;s/\\(default: .\\)false/\\1true/g;}' action.yml >detached/action.yml", "test": "GITHUB_EVENT_PATH= jest" }, "repository": { From 6adc5f7f6f320074ad745196684ab0f61bb42a89 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 1 May 2025 18:49:50 +0200 Subject: [PATCH 26/37] 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 --- detached/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/detached/action.yml b/detached/action.yml index 7121ff64..e60d96a2 100644 --- a/detached/action.yml +++ b/detached/action.yml @@ -64,4 +64,3 @@ outputs: description: 'The raw SSH address without the "ssh" prefix (only set when detached mode is enabled)' web-url: description: 'The web URL to connect to the tmate session (only set when detached mode is enabled and web URL is available)' - From a4b01402bc5606421a83d460e2dae7e68d4432c9 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 1 May 2025 18:53:02 +0200 Subject: [PATCH 27/37] 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 --- .github/workflows/checkin.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index 8b02f737..88f01383 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -32,7 +32,8 @@ jobs: - name: Verify that the project is built run: | if [[ -n $(git status -s) ]]; then - echo "ERROR: generated dist/ differs from the current sources" + echo "ERROR: generated lib/ differs from the current sources" + git status -s git diff exit 1 fi From 04f8167651eb1f7a2b1ccd038c862523d8fed3a0 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 2 May 2025 13:14:55 +0800 Subject: [PATCH 28/37] ci(manual-test): update list of runner images See https://github.com/actions/runner-images/blob/310e8e963731084df01bcbdbd5044a5ca7fc0c88/README.md#available-images. --- .github/workflows/manual-test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-test.yml b/.github/workflows/manual-test.yml index e78184a9..dc8dea4d 100644 --- a/.github/workflows/manual-test.yml +++ b/.github/workflows/manual-test.yml @@ -9,10 +9,12 @@ jobs: runs-on: - ubuntu-22.04 - ubuntu-24.04 - - macos-11.0 - - macos-12.0 + - macos-13 + - macos-14 + - macos-15 - windows-2019 - windows-2022 + - windows-2025 limit-access-to-actor: - true - false From 85c04feabb0dccd8d94ac9e24c7f410921248aba Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 2 May 2025 09:12:52 +0200 Subject: [PATCH 29/37] 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 --- .github/workflows/manual-test.yml | 64 ++++++++++++++++++------------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/.github/workflows/manual-test.yml b/.github/workflows/manual-test.yml index dc8dea4d..0bb7137b 100644 --- a/.github/workflows/manual-test.yml +++ b/.github/workflows/manual-test.yml @@ -1,12 +1,13 @@ -name: Manual test matrix -on: workflow_dispatch - -jobs: - test: - strategy: - fail-fast: false - matrix: - runs-on: +name: Manual test +on: + workflow_dispatch: + inputs: + runs-on: + type: choice + description: 'The runner pool to run the job on' + required: true + default: 'ubuntu-22.04' + options: - ubuntu-22.04 - ubuntu-24.04 - macos-13 @@ -15,31 +16,42 @@ jobs: - windows-2019 - windows-2022 - windows-2025 - limit-access-to-actor: - - true - - false - runs-on: ${{ matrix.runs-on }} + container-runs-on: + type: choice + description: 'The Docker container to run the job on (this overrides the `runs-on` input)' + required: false + default: '(none)' + options: + - '(none)' + - fedora:latest + - archlinux:latest + - ubuntu:latest + limit-access-to-actor: + type: choice + description: 'Whether to limit access to the actor only' + required: true + default: 'auto' + options: + - auto + - 'true' + - 'false' + +jobs: + test: + if: ${{ inputs.container-runs-on == '(none)' }} + runs-on: ${{ inputs.runs-on }} steps: - uses: actions/checkout@v4 - uses: ./ with: - limit-access-to-actor: ${{ matrix.limit-access-to-actor }} + limit-access-to-actor: ${{ inputs.limit-access-to-actor }} test-container: - strategy: - fail-fast: false - matrix: - container-runs-on: - - fedora:latest - - archlinux:latest - - ubuntu:latest - limit-access-to-actor: - - true - - false + if: ${{ inputs.container-runs-on != '(none)' }} runs-on: ubuntu-latest container: - image: ${{ matrix.container-runs-on }} + image: ${{ inputs.container-runs-on }} steps: - uses: actions/checkout@v4 - uses: ./ with: - limit-access-to-actor: ${{ matrix.limit-access-to-actor }} + limit-access-to-actor: ${{ inputs.limit-access-to-actor }} From 26050e867ff300d7457eed1531db90fd6af4230b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 2 May 2025 09:47:59 +0200 Subject: [PATCH 30/37] Add a node.js script to update manual-test's `runs-on` options As I had suggested in https://github.com/mxschmitt/action-tmate/pull/224#issuecomment-2846405397, 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 --- .github/workflows/update-manual-test.js | 57 +++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/update-manual-test.js diff --git a/.github/workflows/update-manual-test.js b/.github/workflows/update-manual-test.js new file mode 100644 index 00000000..769c84df --- /dev/null +++ b/.github/workflows/update-manual-test.js @@ -0,0 +1,57 @@ +#!/usr/bin/env node + +// Update the `runs-on` options of the `manual-test.yml` workflow file with the +// latest available images from the GitHub Actions runner images README file. + +(async () => { + const fs = require('fs') + + const readme = await (await fetch("https://github.com/actions/runner-images/raw/HEAD/README.md")).text() + + // This will be the first `ubuntu` one. + let defaultOption = '' + + const choices = readme + // Get the "Available Images" section + .split(/\n## Available Images\n/)[1] + .split(/##\s*[^#]/)[0] + // Split by lines + .split('\n') + .map(line => { + // The relevant lines are table rows; The first column is the image name, + // the second one contains a relatively free-form list of the `runs-on` + // options that we are interested in. Those `runs-on` options are + // surrounded by backticks. + const match = line.match(/^\|\s*([^|]+)\s*\|([^|]*)`([^`|]+)`\s*\|/) + if (!match) return false // Skip e.g. the table header and empty lines + let runsOn = match[3] // default to the last `runs-on` option + const alternatives = match[2] + .split(/`([^`]*)`/) // split by backticks + .filter((_, i) => (i % 2)) // keep only the text between backticks + .sort((a, b) => a.length - b.length) // order by length + if (alternatives.length > 0 && alternatives[0].length < runsOn.length) runsOn = alternatives[0] + if (!defaultOption && match[3].startsWith('ubuntu-')) defaultOption = runsOn + return runsOn + }) + .filter(runsOn => runsOn) + + // Now edit the `manual-test` workflow definition + const ymlPath = `${__dirname}/manual-test.yml` + const yml = fs.readFileSync(ymlPath, 'utf8') + + // We want to replace the `runs-on` options and the `default` value. This + // would be easy if there was a built-in YAML parser and renderer in Node.js, + // but there is none. Therefore, we use a regular expression to find certain + // "needles" near the beginning of the file: first `workflow_dispatch:`, + // after that `runs-on:` and then `default:` and `options:`. Then we replace + // the `default` value and the `options` values with the new ones. + const [, beforeDefault, beforeOptions, optionsIndent, afterOptions] = + yml.match(/^([^]*?workflow_dispatch:[^]*?runs-on:[^]*?default:)(?:.*)([^]*?options:)(\n +- )(?:.*)(?:\3.*)*([^]*)/) || [] + if (!beforeDefault) throw new Error(`The 'manual-test.yml' file does not match the expected format!`) + const newYML = + `${beforeDefault} ${defaultOption}${[beforeOptions, ...choices].join(optionsIndent)}${afterOptions}` + fs.writeFileSync(ymlPath, newYML) +})().catch(e => { + console.error(e) + process.exitCode = 1 +}) \ No newline at end of file From 2f034cd8e71adc354f495acdac01f96d77c53265 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 2 May 2025 10:56:26 +0200 Subject: [PATCH 31/37] ci(manual-test): update `runs-on` options Brought to you by the new `update-manual-test.js` script. Signed-off-by: Johannes Schindelin --- .github/workflows/manual-test.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/manual-test.yml b/.github/workflows/manual-test.yml index 0bb7137b..419664ef 100644 --- a/.github/workflows/manual-test.yml +++ b/.github/workflows/manual-test.yml @@ -6,16 +6,19 @@ on: type: choice description: 'The runner pool to run the job on' required: true - default: 'ubuntu-22.04' + default: ubuntu-24.04 options: - - ubuntu-22.04 - ubuntu-24.04 - - macos-13 - - macos-14 + - ubuntu-22.04 + - macos-15-large - macos-15 - - windows-2019 - - windows-2022 + - macos-14-large + - macos-14 + - macos-13 + - macos-13-xlarge - windows-2025 + - windows-2022 + - windows-2019 container-runs-on: type: choice description: 'The Docker container to run the job on (this overrides the `runs-on` input)' From 64389e6b21ce37f4f5c33366dadef36b38d5a194 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 2 May 2025 11:04:08 +0200 Subject: [PATCH 32/37] 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 --- .github/workflows/manual-test.yml | 1 + .github/workflows/update-manual-test.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/manual-test.yml b/.github/workflows/manual-test.yml index 419664ef..b0e4ccf1 100644 --- a/.github/workflows/manual-test.yml +++ b/.github/workflows/manual-test.yml @@ -19,6 +19,7 @@ on: - windows-2025 - windows-2022 - windows-2019 + - windows-11-arm container-runs-on: type: choice description: 'The Docker container to run the job on (this overrides the `runs-on` input)' diff --git a/.github/workflows/update-manual-test.js b/.github/workflows/update-manual-test.js index 769c84df..5f173370 100644 --- a/.github/workflows/update-manual-test.js +++ b/.github/workflows/update-manual-test.js @@ -35,6 +35,11 @@ }) .filter(runsOn => runsOn) + // The Windows/ARM64 runners are in public preview (and for the time being, + // not listed in the `runner-images` README file), so we need to add this + // manually. + if (!choices.includes('windows-11-arm')) choices.push('windows-11-arm') + // Now edit the `manual-test` workflow definition const ymlPath = `${__dirname}/manual-test.yml` const yml = fs.readFileSync(ymlPath, 'utf8') From 877e019b4c15232d15c3b8e4de31f91d845c69f7 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 2 May 2025 11:10:50 +0200 Subject: [PATCH 33/37] 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 --- .github/workflows/manual-test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/manual-test.yml b/.github/workflows/manual-test.yml index b0e4ccf1..a68f773f 100644 --- a/.github/workflows/manual-test.yml +++ b/.github/workflows/manual-test.yml @@ -45,6 +45,18 @@ jobs: if: ${{ inputs.container-runs-on == '(none)' }} runs-on: ${{ inputs.runs-on }} steps: + - uses: msys2/setup-msys2@v2 + # The public preview of GitHub-hosted Windows/ARM64 runners lacks + # a working MSYS2 installation, so we need to set it up ourselves. + if: ${{ inputs.runs-on == 'windows-11-arm' }} + with: + msystem: 'CLANGARM64' + # We cannot use `C:\` because `msys2/setup-msys2` erroneously + # believes that an MSYS2 exists at `C:\msys64`, but it doesn't, + # which is the entire reason why we need to set it up in this + # here step... However, by using `C:\.\` we can fool that + # overzealous check. + location: C:\.\ - uses: actions/checkout@v4 - uses: ./ with: From 14991776aa3eae6c52e47cb6443229207bbb43b0 Mon Sep 17 00:00:00 2001 From: PrashantRaj18198 Date: Mon, 13 Oct 2025 11:12:07 +0530 Subject: [PATCH 34/37] style: whitespace changes --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index b67e59be..320b2d61 100644 --- a/src/index.js +++ b/src/index.js @@ -67,8 +67,8 @@ export async function run() { for (let seconds = connectTimeoutSeconds; seconds > 0;) { console.log(`${await hasAnyoneConnectedYet() - ? 'Waiting for session to end' - : `Waiting for client to connect (at most ${seconds} more second(s))` + ? 'Waiting for session to end' + : `Waiting for client to connect (at most ${seconds} more second(s))` }\n${message}`) if (continueFileExists()) { From 98cc0898a3016b5bc58e0f00ea5c2ca53ef5d7c5 Mon Sep 17 00:00:00 2001 From: PrashantRaj18198 Date: Mon, 13 Oct 2025 11:14:36 +0530 Subject: [PATCH 35/37] update action.yml --- detached/action.yml | 65 ++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/detached/action.yml b/detached/action.yml index e60d96a2..760d2b44 100644 --- a/detached/action.yml +++ b/detached/action.yml @@ -1,52 +1,53 @@ -name: 'Debugging with tmate' -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 -author: 'Max Schmitt' + color: gray-dark +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 for tmate 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 tmate session is active' + description: "In detached mode, the workflow job will continue while the ssh session is active" required: false - default: 'true' + default: "true" connect-timeout-seconds: - description: 'How long in seconds to wait for a connection to be established' + description: "How long in seconds to wait for a connection to be established" required: false - default: '600' + default: "600" 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: '' + 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: '' + 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: '' + default: "SHA256:+aWjAPAeKuvuZSPG92Q8yaEkd5eb2T+uF9Jp+8Sb/+A" msys2-location: - description: 'The root of the MSYS2 installation (on Windows runners)' + description: "The root of the MSYS2 installation (on Windows runners)" required: false default: 'C:\msys64' github-token: @@ -56,11 +57,19 @@ inputs: Also when generating a new PAT, select the least scopes necessary. [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 /@gha.warp.build" + required: false + default: "" + named-session-api-key: + description: "API Key required to create named session. Please contact support@warpbuilds.com to get one." + required: false + default: "" outputs: ssh-command: - description: 'The SSH command to connect to the tmate session (only set when detached mode is enabled)' + description: "The SSH command to connect to the tmate session (only set when detached mode is enabled)" ssh-address: description: 'The raw SSH address without the "ssh" prefix (only set when detached mode is enabled)' web-url: - description: 'The web URL to connect to the tmate session (only set when detached mode is enabled and web URL is available)' + description: "The web URL to connect to the tmate session (only set when detached mode is enabled and web URL is available)" From d02116e00fb9ce300de2205dc2b0474d1bc64e82 Mon Sep 17 00:00:00 2001 From: PrashantRaj18198 Date: Mon, 13 Oct 2025 11:23:13 +0530 Subject: [PATCH 36/37] fix: test --- src/index.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/index.test.js b/src/index.test.js index 7564578d..2bbb0ef8 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -23,6 +23,16 @@ jest.mock("fs", () => ({ existsSync: () => true, unlinkSync: () => true, writeFileSync: () => true, + constants: { + O_RDONLY: 0, + O_WRONLY: 1, + O_RDWR: 2, + S_IFMT: 61440, + S_IFREG: 32768, + S_IFDIR: 16384, + S_IFCHR: 8192, + S_IFLNK: 40960, + }, promises: new Proxy( {}, { From 91473f0e88a2f6e35fb71ba78f742dda69b3f021 Mon Sep 17 00:00:00 2001 From: PrashantRaj18198 Date: Mon, 13 Oct 2025 11:24:39 +0530 Subject: [PATCH 37/37] rebuild --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index aeee36bb..a025a42f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -37479,8 +37479,8 @@ async function run() { for (let seconds = connectTimeoutSeconds; seconds > 0;) { console.log(`${await hasAnyoneConnectedYet() - ? 'Waiting for session to end' - : `Waiting for client to connect (at most ${seconds} more second(s))` + ? 'Waiting for session to end' + : `Waiting for client to connect (at most ${seconds} more second(s))` }\n${message}`) if (continueFileExists()) {