diff --git a/github/branch/master/deploy-actions.hcl b/github/branch/master/deploy-actions.hcl index 8e802712..adba8b60 100644 --- a/github/branch/master/deploy-actions.hcl +++ b/github/branch/master/deploy-actions.hcl @@ -7,7 +7,10 @@ locals { main = merge( local.defaults.locals.branch_protection.main, { - required_status_checks = [] + required_status_checks = [ + "validate / Validate PR title", + "ensure-sha-pinned / Ensure actions are pinned to SHAs", + ] } ) } diff --git a/github/branch/master/dot-github.hcl b/github/branch/master/dot-github.hcl new file mode 100644 index 00000000..b4cc0a11 --- /dev/null +++ b/github/branch/master/dot-github.hcl @@ -0,0 +1,20 @@ +locals { + defaults = read_terragrunt_config("defaults.hcl") + + repository = { + name = ".github" + branch_protection = { + main = merge( + local.defaults.locals.branch_protection.main, + { + required_status_checks = [ + "gatekeeper / CI Gatekeeper", + "semantic / Validate PR title", + "lint / Ensure actions are pinned to SHAs", + "Test scripts", + ] + } + ) + } + } +} diff --git a/github/branch/master/monorepo.hcl b/github/branch/master/monorepo.hcl index eb727c90..7eaa4bb2 100644 --- a/github/branch/master/monorepo.hcl +++ b/github/branch/master/monorepo.hcl @@ -8,6 +8,9 @@ locals { local.defaults.locals.branch_protection.main, { required_status_checks = [ + "ci-gatekeeper / CI Gatekeeper", + "validate / Validate PR title", + "ensure-sha-pinned / Ensure actions are pinned to SHAs", "Docs Sync Check", ] # Allows release and image update bots to push directly without failing status checks. diff --git a/github/branch/master/platform.hcl b/github/branch/master/platform.hcl index 1370d0c6..0a532936 100644 --- a/github/branch/master/platform.hcl +++ b/github/branch/master/platform.hcl @@ -7,7 +7,11 @@ locals { main = merge( local.defaults.locals.branch_protection.main, { - required_status_checks = [] + required_status_checks = [ + "ci-gatekeeper / CI Gatekeeper", + "validate / Validate PR title", + "ensure-sha-pinned / Ensure actions are pinned to SHAs", + ] } ) } diff --git a/github/branch/master/terragrunt.hcl b/github/branch/master/terragrunt.hcl index 47cb3162..7b735e1a 100644 --- a/github/branch/master/terragrunt.hcl +++ b/github/branch/master/terragrunt.hcl @@ -10,6 +10,7 @@ locals { monorepo = read_terragrunt_config("monorepo.hcl") platform = read_terragrunt_config("platform.hcl") deploy_actions = read_terragrunt_config("deploy-actions.hcl") + dot_github = read_terragrunt_config("dot-github.hcl") } inputs = { @@ -17,6 +18,7 @@ inputs = { monorepo = local.monorepo.locals.repository platform = local.platform.locals.repository deploy-actions = local.deploy_actions.locals.repository + dot-github = local.dot_github.locals.repository } github_token = get_env("GITHUB_TOKEN") }