Skip to content

Add GitHub Actions workflow for automatic tag indexing - #10

Draft
fafouine wants to merge 1 commit into
mainfrom
claude/tag-index-workflow
Draft

Add GitHub Actions workflow for automatic tag indexing#10
fafouine wants to merge 1 commit into
mainfrom
claude/tag-index-workflow

Conversation

@fafouine

@fafouine fafouine commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What this does

tags/README.md promises that the tag index is regenerated automatically on push via .github/workflows/generate-tag-index.yml, but that workflow never existed. This PR adds it.

The workflow:

  • Triggers on pushes to main that touch LOGS/** or concepts/** (plus a manual workflow_dispatch button).
  • Sets up Python 3.11 and runs python scripts/generate_tag_index.py.
  • Commits any changes under tags/ back to the repo (guarded so it never attempts an empty commit).

⚠️ One manual step required

The automation token used to open this PR is a Personal Access Token without the workflow scope, and GitHub refuses any push that creates a file under .github/workflows/ without it. So the workflow is staged in this PR at .github/workflows-pending/generate-tag-index.yml and must be moved into .github/workflows/ by a credential that has the scope (your normal GitHub web session works):

git mv .github/workflows-pending/generate-tag-index.yml .github/workflows/generate-tag-index.yml
git rm .github/workflows-pending/README.md
git commit -m "Activate automatic tag indexing workflow"
git push

Until the file lives at .github/workflows/generate-tag-index.yml, GitHub will not run it.

Validation

  • YAML parses cleanly (yaml.safe_load).
  • Passes actionlint v1.7.12 with no findings.
  • Dry run: added a sample tagged note, ran the script, confirmed tags/index.md + category and per-tag pages are generated, and that the commit gate detects the changes.

Explainer doc

Full write-up (background, intuition, code walkthrough, verification, alternatives, quiz): https://app.notion.com/p/3b4072e6ebfe81148279fa6760f2de74

Task: https://app.notion.com/p/3b4072e6ebfe81249b15ede0cfae7440

Adds a GitHub Actions workflow that regenerates the tag index (tags/) on
pushes to main touching LOGS/** or concepts/**, and commits the result back
to the repo. Also runnable on demand via workflow_dispatch.

The file is staged under .github/workflows-pending/ because the automation
token lacks GitHub's 'workflow' scope and cannot write under .github/workflows/.
See .github/workflows-pending/README.md for the one-step relocation.

Co-authored-by: Johanie Martin Lafond <omgwtfgtfoomw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants