Skip to content

ci: rebuild Actions on GITHUB_TOKEN with TechEngine reusable workflows - #376

Closed
Seungpyo1007 wants to merge 2 commits into
developfrom
ci/actions-rebuild
Closed

Seungpyo1007 wants to merge 2 commits into
developfrom
ci/actions-rebuild

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

What & why

Brings back the automation removed in "ci: remove every GitHub Actions workflow", without personal access tokens. Every job runs in this repo and calls TechEngine's workflows as reusable workflows, so this repo's GITHUB_TOKEN does the writing as github-actions[bot] (TechEngine ADR-017).

Refs #297

Depends on GetTechAPI/TechEngine#126. Merge that first: these workflows call TechEngine @main.

Workflows

Workflow Trigger What it does
validate-data.yml PR, push (data/) Restored unchanged; it never used a token
deploy-pages.yml push to main Restored unchanged
pr-validation.yml PR (data/, site/) Calls TechEngine's PR review and comments the result
verify-report.yml PR (data/) Calls TechEngine's Tier 0 report and comments it
verify-command.yml /verify comment On-demand Tiers 0-3 report
dump-develop.yml push to develop (data/) Dump plus data/_verify/status.json, built from TechEngine main instead of the submodule pin
weekly-data.yml manual Runs refresh, ingest or verify-network and opens a PR to develop. It has no schedule until each job has been checked by hand
final-review.yml /final-review comment TechEngineBot posts one final-check comment summarizing the PR's checks. This is the only place the bot account is used

bump-engine, notify-engine and pr-metadata are not restored. The TechEngine submodule pointer is bumped by hand.

Settings needed after merge

  • Re-enable Actions for this repo (currently disabled).
  • Settings → Actions → General: turn on "Allow GitHub Actions to create and approve pull requests", so weekly-data can open PRs.
  • Add the repo secret TECHENGINEBOT_TOKEN: a fine-grained token from the TechEngineBot account, limited to this repo, with Pull requests: write only. Until it is set, /final-review writes its result to the job summary only.

Testing

  • actionlint 1.7.7 passes on every workflow here. The run used TechEngine's branch versions in place of the remote uses: references, so inputs, types and permissions were checked against them.
  • No workflow here references a secret except final-review.yml, which uses TECHENGINEBOT_TOKEN for its single comment.
  • These workflows have not run on GitHub yet.

The previous workflows relayed events to TechEngine and edited the triage
project with personal access tokens (ENGINE_TOKEN, PROJECT_TOKEN), so the
automation ran under a real account. Bring the automation back with this
repo's GITHUB_TOKEN only: every job runs here, calls TechEngine's workflows as
reusable workflows, and writes as github-actions[bot] (TechEngine ADR-017).

- validate-data and deploy-pages return unchanged; neither used a token.
- pr-validation and verify-report call TechEngine's review and Tier 0
  workflows on PRs; verify-command does the same for `/verify` comments.
- dump-develop checks out TechEngine main instead of the submodule pin and
  also refreshes data/_verify/status.json (was TechEngine verify-status).
- weekly-data runs refresh, ingest or verify-network on demand; it has no
  schedule until each job has been checked by hand.
- bump-engine, notify-engine and pr-metadata are not restored.
A maintainer types `/final-review` on an important PR and TechEngineBot posts
one comment (edited in place on re-runs) summarizing the checks on the PR
head. Checks are read with GITHUB_TOKEN; TECHENGINEBOT_TOKEN is used only for
that comment, and nothing else runs as the bot.
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.

1 participant