NWarila/github-terraform-runner

GitHub: NWarila/github-terraform-runner

一个基于 Terraform 的 GitHub 仓库即代码管理运行器,通过声明式 YAML 清单和共享框架自动化管理个人 GitHub 仓库的完整生命周期。

Stars: 0 | Forks: 0

# NWarila/github-terraform-runner [NWarila](https://github.com/NWarila) GitHub 用户账户的 GitHub-as-code 部署器。负责管理 `repos/` 下的仓库清单,并将实际的 `terraform apply` 委派给 [github-terraform-framework](https://github.com/nwarila-platform/github-terraform-framework) 可复用工作流。 此仓库是 [NWarila/terraform-template](https://github.com/NWarila/terraform-template) 契约下的一个*运行器 (runner)*。它本身不包含任何 Terraform 模块代码;所有的门控(验证、安全扫描、CodeQL、scorecard、同步、发布、自动合并)都通过 terraform-template 的可复用工作流运行,而部署则通过 `nwarila-platform/github-terraform-framework` 的 `reusable-terraform-deploy` 工作流运行。 ## 目录结构 ``` repos/ public/ YAML definitions for public repos under NWarila private/ Empty in-repo (gitkeep only); fetched from S3 at deploy time (Personal.yml, Resume.yml, github-sandbox.yml) tests/ fixtures/ Public-safe fixtures used by pr-validation .github/workflows/ pr-validation.yaml end-to-end CI: checks out the framework at the pinned SHA, overlays this runner's repos/, runs `make ci` against the assembled tree terraform-deploy.yaml the apply path: plans and applies on push to main, with three named private YAMLs s3-cp'd at runtime ... universal callers (security, codeql, scorecard, release-please, auto-merge, template-sync) ``` ## 变更如何落地 1. 在 `repos/public/` 下编辑 YAML 文件(或将新的私有 YAML 上传至 S3)。 2. PR 验证端到端运行:framework + 此 PR 的数据 + 公共安全的 `tests/fixtures/` 私有覆盖层 → 必须通过契约、lint、安全检查以及 `terraform plan`。 3. 合并后,`terraform-deploy.yaml` 会在 `main` 分支上执行 apply。 Renovate 使 `framework_ref` 和 deploy-reusable SHA 与 framework 的 `main` 分支保持同步。受信任的 bot PR 在所需的检查通过后会自动合并;人工 PR 则遵循常规的审查流程。
标签:CISA项目, CodeQL, ECS, GitHub Actions, GitHub-as-code, GitHub Workflows, GitHub 配置管理, IaC 框架, Pull Request 验证, S3 存储, Terraform, YAML 配置, 仓库管理, 代码安全扫描, 安全可观测性, 安全评估工具, 平台工程, 版本控制, 特权提升, 自动化运维, 自动化部署, 自动笔记