Skip to content

Using libtea in CI

Mehrn0ush edited this page Nov 22, 2026 · 1 revision

Using libtea in CI

GitHub Action

The repository is also a GitHub Action. It installs a released libtea binary, checks its SHA-256 against the release's SHA256SUMS, verifies the build-provenance attestation when gh is available, and runs one command.

Fail the job when what a server publishes no longer matches your lock:

- uses: Mehrn0ush/libtea-rs@<commit-sha-of-a-release-tag>
  with:
    version: "0.2.2"
    command: sync
    tei: tei://example.com/uuid/2ff3ae7c-8eab-4e0b-9b8b-1a0c4c4c1c2d
    lock-file: tea.lock
    check: "true"
  • Pin uses: to a commit SHA and version: to an exact release; there is no latest.
  • Pass credentials only through the api-key-id and api-key-secret inputs, from secrets. Do not put TEA_API_KEY_* in env:: the Action refuses to run if it finds them there.
  • On Linux runners or containers without glibc 2.34+ (Alpine, Ubuntu 20.04), set libc: musl.

All inputs, outputs and more examples: github-action.md.

Other CI systems

Install a release archive and verify it as in installing.md, then run the same commands. The exit codes are stable, so a pipeline can branch on them: 7 means "changed", 6 means "integrity not established", 5 means "not found".

libtea sync "$TEI" --lock tea.lock --check

A typical flow: commit tea.lock, run sync --check on a schedule, and when it exits 7 run sync again and review libtea diff before committing the new lock.

Clone this wiki locally