From 97df6bb43a17352f3f174c3a2a48c01231f41aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Castelli=20Zacharias?= Date: Sun, 19 Nov 2023 17:57:39 +0100 Subject: [PATCH] feat: add spec repository (#5) --- stages/repositories/spec.tf | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 stages/repositories/spec.tf diff --git a/stages/repositories/spec.tf b/stages/repositories/spec.tf new file mode 100644 index 0000000..7b0cbe0 --- /dev/null +++ b/stages/repositories/spec.tf @@ -0,0 +1,31 @@ +module "specification" { + source = "../../modules/github-repo" + name = "spec" + description = "This is the powerd6 specification, and it documents how the project behaves." + topics = ["specification", "documentation"] + org_administrators = var.org_administrators +} + +resource "github_repository_environment" "spec_preview" { + environment = "preview" + repository = module.specification.name + deployment_branch_policy { + protected_branches = true + custom_branch_policies = false + } +} + +resource "github_repository_environment" "spec_release" { + environment = "release" + repository = module.specification.name + deployment_branch_policy { + protected_branches = false + custom_branch_policies = true + } +} + +resource "github_repository_environment_deployment_policy" "spec_release_main" { + repository = module.specification.name + environment = github_repository_environment.infra_live.environment + branch_pattern = module.specification.main_branch +} \ No newline at end of file