Skip to content

mcevoypeter/tf-gh-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Repository

This Terraform module creates a GitHub repository with opinions on the development workflow, which are described below.

Settings

Branch Protections

The default branch is protected. Pull requests that target the default branch must be up-to-date before merging. A pull request's reviews are dismissed each time a new commit is pushed.

Merge Settings

Merge commits are the only allowed form of merge; squash merges and rebase merges are both disallowed. The merge commit title and message are set to the corresponding pull request title and body, respectively.

Environments

Zero or more environments may be specified with accompanying GitHub Actions secrets and variables. Only protected branches that match the environment's deployment policy may deploy to the environment.

Issues

Repository issues are turned off.

Wiki

The repository wiki is turned off.

Example

module "example_repo" {
  source             = "[email protected]:mcevoypeter/tf-gh-repo.git"
  name               = "example"
  description        = "This repo was created with the tf-gh-repo module"
  gitignore_template = "Go"
  topics = [
    "github",
    "github-actions",
    "terraform",
  ]
  admin_collaborators = ["mcevoypeter"]
  environments = {
    "testing" = {
      deployment_policy = { branch_pattern = "main" },
      secrets = [
        {
          name            = "SOME_SECRET",
          plaintext_value = "SOME_SECRET_VALUE",
        },
      ],
      variables = [
        {
          name  = "SOME_VARIABLE",
          value = "SOME_VARIABLE_VALUE",
        },
      ]
    }
  }
  gha_access_level = "user"
}

License

This project is licensed under the terms of the MIT license.

About

Create an opinionated GitHub repo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages