A GitHub Action to automatically re-verify your Xahau Hook on Hookstore when you publish a new release or tag.
- ✅ Zero Configuration - Automatically detects repository URL and source reference
- 📦 Auto-publish - Optionally create new releases automatically
- 🔐 Secure - Uses your Hookstore API key for authentication
- 🚀 Multiple Triggers - Works with tags, releases, or manual dispatch
- ⏳ Wait for Completion - Optionally block until verification completes (useful for CI/CD gates)
name: Hookstore Re-verification
on:
push:
tags:
- 'v*.*.*'
release:
types: [published]
jobs:
reverify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Re-verify Hook
uses: Xahau/reverify-hook@v1
with:
api_key: ${{ secrets.HOOKSTORE_API_KEY }}Block until verification completes (useful for CI/CD gates):
- name: Re-verify and Wait
uses: Xahau/reverify-hook@v1
with:
api_key: ${{ secrets.HOOKSTORE_API_KEY }}
wait_for_completion: true
timeout: 900 # 15 minutesAutomatically create a new release if it doesn't exist:
- name: Re-verify with Auto-create
uses: Xahau/reverify-hook@v1
with:
api_key: ${{ secrets.HOOKSTORE_API_KEY }}
create_if_missing: true- Go to Hookstore Console
- Generate a new API key with
builds:triggerpermission - Copy the generated key (starts with
hks_)
- Go to your repository on GitHub
- Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
HOOKSTORE_API_KEY - Value: Your API key from step 1
- Click Add secret
| Input | Required | Default | Description |
|---|---|---|---|
api_key |
Yes | - | Your Hookstore API key |
api_url |
No | https://api.hookstore.xahau.network |
API endpoint URL |
source_ref |
No | Auto-detected | Source reference (tag/branch/commit) |
create_if_missing |
No | false |
Create new release if it doesn't exist |
wait_for_completion |
No | false |
Block until verification completes |
timeout |
No | 600 |
Max wait time in seconds (if waiting) |
| Output | Description |
|---|---|
hook_slug |
The hook slug that was re-verified |
semver |
The semantic version that was re-verified |
release_id |
The release ID |
created |
Whether a new release was created |
status |
Verification status (queued, verified, failed, timeout) |
- Detects Context: Automatically determines repository URL and source reference from GitHub context
- Finds Hook: Looks up your hook by repository URL on Hookstore
- Finds/Creates Release: Locates existing release or creates new one (if
create_if_missing: true) - Queues Verification: Triggers re-verification on Hookstore
- Optionally Waits: If
wait_for_completion: true, polls status until verification completes
The action automatically detects the source reference in this order:
- Manual
source_refinput (if provided) - GitHub release tag name (if triggered by release event)
- Git tag name (if triggered by tag push)
- Manifest version from
hookstore.manifest.json(if file exists) - Commit SHA (fallback)
on:
push:
tags:
- 'v*.*.*'
jobs:
reverify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Xahau/reverify-hook@v1
with:
api_key: ${{ secrets.HOOKSTORE_API_KEY }}on:
release:
types: [published]
jobs:
reverify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Xahau/reverify-hook@v1
with:
api_key: ${{ secrets.HOOKSTORE_API_KEY }}
create_if_missing: trueBlock deployment until verification completes:
jobs:
verify-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify Hook
id: verify
uses: Xahau/reverify-hook@v1
with:
api_key: ${{ secrets.HOOKSTORE_API_KEY }}
wait_for_completion: true
timeout: 900
- name: Deploy
if: steps.verify.outputs.status == 'verified'
run: |
echo "Hook verified! Deploying..."
# Your deployment steps hereThis action uses semantic versioning. You can pin to:
@v1- Latest v1.x.x (recommended)@v1.0.0- Specific version@main- Latest from main branch (not recommended for production)
Cause: Your hook hasn't been published to Hookstore yet.
Solution:
- Publish your hook via the Hookstore Console first
- Or use
create_if_missing: trueto automatically create the release
Cause: No release exists for the specified source reference.
Solution:
- Create the release via the console first
- Or use
create_if_missing: trueto automatically create it
Cause: Verification took longer than the specified timeout.
Solution:
- Increase the
timeoutvalue (default: 600 seconds) - Check Hookstore Console for build errors
- Verify your source code builds successfully
- ✅ API key stored as GitHub secret (encrypted)
- ✅ Builds run in isolated Docker containers on Hookstore
- ✅ Source code verified against on-chain hash
- ✅ All requests authenticated
Best Practices:
- Use a dedicated API key per repository
- Limit API key permissions to
builds:triggeronly - Rotate API keys periodically
- Monitor API key usage in Console