Skip to content

natescherer/postmodern-repo-copiertemplate

Repository files navigation

Postmodern Repo Copier Template

All Contributors

❗ Notice: This project is currently in a Pre-Alpha state and is not ready for public use.

A Copier template for creating a basic repository with full, all-the-bells-and-whistles CI/CD. (And for creating other templates!)

This template is heavily inspired by the Hypermodern Python Cookiecutter.

Why Postmodern? Besides being a cheeky homage to this template's inspiration, I think that Postmodern philosophy's idea of the relativity of truth applies very well to software. There's no objectively best way to do CI/CD, this is just one way that works, and it might work for you too!

Included Features

Core

Support for Multiple CI/CD Platforms

  • GitHub Recommended
    • Creating repos under both users and orgs is supported
    • See GitHub Org Limitations for details about template features excluded for Orgs
  • Azure DevOps

Support for Public (Open-Source) and Private (Closed-Source) Repositories

This template fully supports both public/open-source and private/closed-source repositories. See Public vs Private Repos for the difference.

Support for Existing Projects

Postmodern templates are designed to allow either the creation of new templates from scratch or adoption for existing projects with existing code repos.

Support for Template Updates

Keeping projects in sync with their parent template is a core feature of Copier, and this template will deploy a GitHub Actions Workflow/Azure DevOps Pipeline that will automate the update process.

Support for Child/Recursive Templates

It is highly encouraged for you to take this template and make your own child template that meets your needs. Your child template can (optionally) receive updates from this template.

Repository Management

  • Creation of new repos and initial branch containing template code
  • Setting of repo settings & branch protection rules
  • Creation of useful non-default issue labels via GitHub CLI script: awaiting pr and blocked
  • Contributor management and crediting via All Contributors
  • GitHub Actions dependency updating via Dependabot
  • Synchronization with updates to this template via cruft
  • (Optional) Secret management via Doppler

Code Management and Formatting

  • Code formatting (YAML and Markdown) via Prettier

CI/CD

Support Files

  • .gitignore, set to ignore macOS .DS_Store files
  • CODE_OF_CONDUCT.md, derived from The Contributor Covenant
  • CONTRIBUTING.md, designed help novices to make their first contribution
  • LICENSE, a copy of the MIT License
  • README.md, designed for general products

Prerequisites

Your Machine

There are two ways to install the prerequisites needed on your machine: running them inside of a devcontainer, or installing them manually. Please see linked documentation for details:

Prerequisites via Devcontainer Recommended

Prerequisites via Manual Installation

GitHub

One-Time Actions for all Postmodern repositories

  1. Install the AllContributors GitHub App for your user or organization.
    • You can either give it access to all your repositories, which means you only need to do this step once, or you can select repositories individually, in which case you will need to do this for each new repo you create.
  2. Ensure Private vulnerability reporting > Automatically enable for new public repositories is checked here.
  3. Set up the Trunk.io GitHub integration using their instructions
    • You can either give it access to all your repositories, which means you only need to do this step once, or you can select repositories individually, in which case you will need to do this for each new repo you create.

Per-Repository Actions

  1. (If using Doppler for secret management) Ensure you have a Doppler account created, then set up the GitHub Actions integration via these instructions.
    • This only needs done once for all repositories

Using this template

  1. Open a terminal to the parent directory where you want the repo subdirectory to be created

  2. Run the following to initialize the template (and the linked GitHub repo):

    copier copy --trust gh:natescherer/postmodern-repo-template .

Questions/Comments

If you have questions, comments, etc, please enter a GitHub Issue with the "question" tag.

Contributing/Bug Reporting

Contributions and bug reports are gladly accepted! Please see CONTRIBUTING.md for details.

Contributors

Nate Scherer
Nate Scherer

πŸ’» 🚧 πŸ“– πŸš‡
github-actions[bot]
github-actions[bot]

🚧 πŸ’»

This project follows the all-contributors specification. Contributions of any kind are welcome!

License

This project is licensed under The MIT License - see LICENSE for details.

Repository Template

This repository is based on the template of itself. Neat, huh?

About

A Copier template for creating a basic repository with full, all-the-bells-and-whistles CI/CD. (And for creating other templates!)

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •