Add GitHub Actions workflow for automatic tag indexing - #10
Draft
fafouine wants to merge 1 commit into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
tags/README.mdpromises 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:
mainthat touchLOGS/**orconcepts/**(plus a manualworkflow_dispatchbutton).python scripts/generate_tag_index.py.tags/back to the repo (guarded so it never attempts an empty commit).The automation token used to open this PR is a Personal Access Token without the
workflowscope, 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.ymland 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 pushUntil the file lives at
.github/workflows/generate-tag-index.yml, GitHub will not run it.Validation
yaml.safe_load).actionlintv1.7.12 with no findings.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