Prerequisites
- A Truthlocks Verify account at verify.truthlocks.com
- A personal access token from verify.truthlocks.com/settings
- A GitHub repository with Actions enabled
Quick start
Add the following workflow to your repository:TRUTHLOCK_TOKEN.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
token | Yes | — | Your Truthlocks personal access token |
files | No | — | Files or glob patterns to protect (space-separated) |
directory | No | — | Directory to protect (all files, up to 3 levels deep) |
category | No | code | Content category for the protections |
visibility | No | public | public or private |
title-prefix | No | — | Prefix added to each protection title |
files or directory. If both are omitted, the action exits with an error.
Categories
Use thecategory input to classify the protected content:
code, research, design, media, dataset, ai-output, writing, digital-art, other
Outputs
The action provides three outputs you can reference in subsequent workflow steps:| Output | Description |
|---|---|
attestation-ids | Comma-separated list of attestation IDs created |
protection-count | Number of files protected |
badge-url | Verification badge URL for the first attestation |
Using outputs in your workflow
Examples
Protect source files on push to main
Protect build artifacts on release
Private protections
Setvisibility: private to protect content without listing it publicly. Private protections are still verifiable by attestation ID but do not appear in your public portfolio.
How it works
The action:- Installs the
@truthlock/protectCLI - Authenticates using your token
- Computes a SHA-256 hash of each file (the file content is never uploaded)
- Mints an attestation for each hash, anchored to the transparency log
- Outputs the attestation IDs and a verification badge URL
Related
Protect CLI
Protect files from the command line for local workflows.
Content protection
Full guide to protecting content and sharing proof links.
