Guides
Keep your repository map up to date
Optional. If your API's code is in a GitHub repository, a GitHub Action can keep the map Tether has of it current: on every push to your default branch, your own runner analyses the checkout and publishes what changed. Your source code never leaves the runner, and the key it uses cannot change your live assistant.
Nothing else in Tether needs this. It repeats, on every push, the optional repository step of Connect your platform.
What it does
On your runner, the action:
- installs the
tetherCLI on Node 22 and runstether analyze, which reads your checkout and writes.tether/knowledge/and a local index, on the runner; - runs
tether publishas a dry run with the secret scan, and prints the plan in the job summary. If the scan finds a secret, the step fails and nothing is sent; - runs
tether publish --sendwith your workspace's CI key.
What reaches Tether is three kinds of artifact, each tagged with the commit:
| What | Where it goes | What happens |
|---|---|---|
| Your OpenAPI contract | The import's draft step | Tether records the draft. Nothing is imported until a person declares whether each operation reads or writes |
| Docs you choose | Knowledge | Stored with their source. One you already hold is replaced only if the key was issued to replace |
| Domain vocabulary | A suggestion | Waits in the dashboard. Your pack changes only when you accept it |
Your source code, your routes, the dependency graph, the file list and the index are never sent, and the action uploads nothing as an artifact. The CI key cannot reach any other route: changing the pack, policy, catalog, endpoint, users or keys is refused with a reason.
Set it up from the dashboard
Open the dashboard's Repository section (it is also on the last step of setup):
-
Issue a CI key. It is shown once. Tick "May replace documents" only if you want the runner to update documents you already hold.
-
Add the workflow. Click Connect GitHub and choose the repository from the list. The list shows the repositories Tether's GitHub App is installed on; Add a repository on GitHub installs it on more. The panel takes the default branch from GitHub, shows the workflow, and Open a pull request opens one from
tether/setupthat adds.github/workflows/tether.yml. Add the TETHER_CI_KEY secret opens your repository's Actions secrets: name itTETHER_CI_KEY, paste the key, then merge the pull request. The key is never put in a link, in the file or in the pull request.You can still type the owner, repository and default branch instead (Type the repository instead); a deployment without the GitHub App shows only that form. Then Create the workflow on GitHub opens GitHub's new-file page with the workflow filled in, and you commit it yourself.
-
See what arrived. After a run, the panel shows the last publish (its commit, when, with which key, and each artifact) and the vocabulary waiting for you, with Accept and Dismiss.
The workflow
name: Tether repository map
on:
push:
branches: ['main']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: tether-publish
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: SynapseGeorgia/Tether/actions/publish@v0.1.0
with:
tether-url: 'https://your-tether-host'
ci-key: ${{ secrets.TETHER_CI_KEY }}
api-url: 'https://api.example.com'
| Input | What it is |
|---|---|
tether-url | The Tether API your workspace is on (required) |
ci-key | The CI key, from secrets.TETHER_CI_KEY (required). A secret key, tth_, is refused |
api-url | Where your operations are called (--api), when your OpenAPI document names no absolute server |
directory | What to analyse, relative to the checkout (default .) |
docs | Globs over the docs the analysis lists, one per line (default: every doc) |
replace | 'true' to replace documents already held; refused unless the key allows it |
allow-secret | Fingerprints of reviewed secret-scan false positives, one per line |
cli | A published tarball URL or npm package spec to install the CLI from |
The workflow needs only contents: read, and persist-credentials: false keeps the checkout's
token off the disk, since nothing here pushes.
The GitHub App
Connecting GitHub signs you in through Tether's GitHub App. The dashboard keeps that sign-in
sealed in your browser for at most 8 hours and uses it for three things: to list the repositories
you installed the App on, to check whether .github/workflows/tether.yml is already there, and to
open the pull request that adds it. Disconnect GitHub revokes it. Tether's API never receives
it.
| Permission | Level | Why |
|---|---|---|
| Metadata | read | To list the repositories you chose and their default branch |
| Contents | read and write | To read that one workflow file, and to push the tether/setup branch that carries it |
| Workflows | write | To add a file under .github/workflows/ |
| Pull requests | write | To open the setup pull request, and to find one already open |
The App never reads your code, has no access to secrets, and has no webhook, so it learns nothing when you push. You can choose which repositories it may see when you install it, and remove it at any time from your GitHub settings.
Related
- Repository: the CI key, what arrived, suggestions
- The tether CLI:
tether publishwith a CI key - Connect your platform