Skip to content

Tokenman Docs Maintainer #3

Tokenman Docs Maintainer

Tokenman Docs Maintainer #3

Workflow file for this run

# TEMPLATE — installed into consumer repos at `/tokenman init` as
# .github/workflows/tokenman.yml. This file in the library repo never
# runs; the installed copy on a consumer does.
#
# Actions-first runtime template. mode=single runs one maintainer;
# mode=onboarding runs every enabled maintainer in one session.
#
# Requires: secrets.CLAUDE_CODE_OAUTH_TOKEN configured on the consumer repo.
name: tokenman
on:
schedule:
- cron: '17 9 * * 1'
workflow_dispatch:
inputs:
mode:
description: single (one skill) or onboarding (all enabled skills)
required: true
default: single
type: choice
options:
- single
- onboarding
skill:
description: Skill to run (required when mode=single)
required: false
default: readme-maintainer
permissions:
contents: write
pull-requests: write
concurrency:
group: tokenman
cancel-in-progress: false
jobs:
tokenman-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install tokenman harness
run: pip install git+https://github.com/verkyyi/tokenman.git@main
- name: Install claude CLI
run: |
npm install -g @anthropic-ai/claude-code
claude --version
- name: Configure git identity for bot commits
run: |
git config --global user.email "tokenman-bot@users.noreply.github.com"
git config --global user.name "tokenman-bot"
- name: Install curated skills
run: |
if [ "${{ inputs.mode }}" = "onboarding" ]; then
python -m harness.install --repo .
else
python -m harness.install --repo . --skill "${{ inputs.skill }}"
fi
- name: Run tokenman
env:
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ inputs.mode }}" = "onboarding" ]; then
python -m harness.onboard --repo . --runtime-mode actions
else
python -m harness.run --skill "${{ inputs.skill }}" --repo . --runtime-mode actions
fi
- name: Upload run artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: tokenman-${{ inputs.mode }}-${{ github.run_id }}
path: .tokenman/runs/
if-no-files-found: warn