Skip to content
Open
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ Community actions that build on top of `setup-tessl`:
| --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [tesslio/patch-version-publish](https://github.com/tesslio/patch-version-publish) | Publish plugins with automatic patch version bumping — queries the registry for the latest version, bumps patch, publishes, and commits the updated `.tessl-plugin/plugin.json` back. Respects manual version bumps. | Use instead of `setup-tessl` + `tessl plugin publish`. It includes `setup-tessl` internally. |

## Cleanup

At job completion, the action automatically runs `tessl logout` on a
best-effort basis, clearing on-disk Tessl credentials (such as
`~/.tessl/llm-key.json`) so they do not persist on self-hosted or otherwise
persistent runners. This teardown never fails the job — if the CLI is missing
or there is nothing to clear, it is a harmless no-op.

## License

MIT
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ runs:
run: |
echo "::add-mask::${TESSL_TOKEN}"
echo "TESSL_TOKEN=${TESSL_TOKEN}" >> "$GITHUB_ENV"

- name: Register Tessl logout for job completion
uses: ./logout
6 changes: 6 additions & 0 deletions logout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Tessl logout (post)
description: Logs the Tessl CLI out of the runner at job completion (best effort).
runs:
using: node20
main: main.js
post: post.js
1 change: 1 addition & 0 deletions logout/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// no-op: logout runs in the post step
15 changes: 15 additions & 0 deletions logout/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { spawnSync } = require("node:child_process");

const result = spawnSync("tessl", ["logout"], { stdio: "inherit" });

if (result.error) {
if (result.error.code === "ENOENT") {
console.log("tessl binary not found; skipping logout");
} else {
console.log(`Tessl logout (best effort) failed to start: ${result.error.message}`);
}
} else if (result.status !== 0) {
console.log(`Tessl logout (best effort) exited with code ${result.status}`);
}

process.exit(0);
Loading