Repository navigation
ci: rebuild Actions on GITHUB_TOKEN and generate the API at deploy time - #377
Open
Seungpyo1007 wants to merge 5 commits into
Open
Seungpyo1007 wants to merge 5 commits into
Seungpyo1007 wants to merge 5 commits into
Conversation
Bring back the Pages deploy without any token and without committing generated files. pages.yml runs on a push to main (a merged release PR) or by hand. It validates the data, regenerates site/public/v1, openapi.json and data/_verify/status.json with the pinned TechEngine, checks every collection's counts against data/, builds the site and publishes it. A manual run on any other branch is a dry run. The build job can only read the repository; only the deploy job can write, and only to Pages. Engine steps run with every proxy pointed at a closed port, so they cannot reach third-party sites. Actions are pinned by SHA. Regenerating at deploy time also fixes what the committed dump gets wrong today: the software pages named build and env, which .gitignore keeps out of git, and records changed since the last dump refresh. Refs #297
… check pr-checks.yml runs on every PR into develop or main with a read-only token and no secrets: the bundled validator, TechEngine's validator on the changed records (every record when the pin moves), the integrity gate, a Tier 0 report and, when site/ changes, the site build. Results go to the job summary and file annotations; nothing is commented. final-check.yml runs when a maintainer adds the final-check label to a PR. It builds what pages.yml would publish from the PR, and TechEngineBot posts one comment with the verdict, edited in place when the label is added again. Only that comment uses TECHENGINEBOT_TOKEN, and the job refuses anything but a fine-grained token of TechEngineBot. Fork PRs get no comment. Dependabot opens the TechEngine submodule bump weekly and grouped action updates monthly, at most one open PR each, into develop. Nothing fills the PR sidebar automatically any more, so the template asks for it. Refs #297
pages.yml now generates site/public/v1 and openapi.json at deploy time from the data it publishes, so the committed copy only went stale and grew the repository with every refresh. Remove it from the index (the files stay on disk) and ignore it, keeping only the hand-made v1/games/index.json pointer. Anchor the build/, dist/, env/, venv/, .venv/ and htmlcov/ rules to the repository root: unanchored, build/ and env/ also matched the software pages v1/software/build and v1/software/env, so those two never reached the site. The growth chart read its points from the history of v1/index.json. build-history.mjs keeps those and continues from the first-parent commits that changed data/, counting one JSON file per record as the manifest does. Refs #297
The job summary is not readable through the API, so a passing run left no record of what it checked anywhere but the web page. Refs #297
The first full run on GitHub took 49 minutes to generate the API, which left pages.yml (full-history checkout, upload) too little room under 90. Refs #297
This branch has not been deployed
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.
Summary
Brings back CI and the Pages deploy with no personal access token anywhere. Every job runs on this repository's read-only
GITHUB_TOKEN; the only write is the Pages deploy. TechEngineBot is used in exactly one place: the comment of a final check a maintainer asks for.Change
pages.yml: on a push tomain(a merged release PR) or by hand. It validates the data, generatessite/public/v1,openapi.jsonanddata/_verify/status.jsonwith the pinned TechEngine, checks every collection's counts againstdata/, builds the site and deploys it. A manual run on any other branch is a dry run.pr-checks.yml: every PR intodevelopormain. It runs the bundled validator, TechEngine's validator on the changed records (every record when the pin moves), the integrity gate, a Tier 0 report and, whensite/changes, the site build. Results go to the job summary and file annotations; it never comments.final-check.yml: when a maintainer adds thefinal-checklabel. It builds everythingpages.ymlwould publish from the PR, and TechEngineBot posts one comment with the verdict, edited in place on re-runs. Only the comment job seesTECHENGINEBOT_TOKEN, and it refuses anything but a fine-grained token of TechEngineBot. Fork PRs get no comment.dependabot.yml: the TechEngine submodule bump (weekly) and grouped action updates (monthly), at most one open PR each, intodevelop..gitignorekeeps only the hand-madev1/games/index.jsonpointer. The unanchoredbuild/andenv/rules that hidv1/software/buildandv1/software/envare now anchored to the root.build-history.mjs: the growth chart now continues from the commits that changeddata/after the last committed manifest.All actions are pinned by SHA. Engine steps run with every proxy pointed at a closed port, so they cannot reach third-party sites.
Not changed
pull_request_target, cross-repo dispatch, PR-opening jobs, or crawls.Settings (applied by hand, not in this diff)
Actions was re-enabled just before this PR opened, so pr-checks runs on it:
GITHUB_TOKENthat cannot approve PRs.push,pull_requestandworkflow_dispatch, triggered by Seungpyo1007 or dependabot[bot].Check
integrity_check.py --strictandapp.verify statusall passed. The regeneratedstatus.jsondiffers from the committed one only ingenerated_at. A smoke dump of brands and socs passed.check_dump.pyon the committed dump fails onlysoftware(42,493 records but 42,491 pages), which is the ignoredbuild/envdefect this fixes.@are removed from quoted logs.pages.ymldry run ondevelopafter merge.Closes #297