Giter Club home page Giter Club logo

.github's Introduction

CloudQuery .github Repo

This repository contains Continuous Integration (CI) workflows, repositories settings and template files for repositories in the cloudquery and cloudquery-policies GitHub organizations. Since we have many repositories, and that number is expected to grow as we add more providers, we rely on automation to reduce the maintenance burden and to keep repositories in sync.

Sync file automation

See code here and configuration here.

We sync the following files

  • GitHub Actions workflows under workflows directory
  • Pull request templates, linting configurations, release configurations, code owners files, renovate configuration, etc. under misc directory.

Sync files templating

We use a customized version of a GitHub Action to sync files between repositories. The customized version adds templating support when syncing files.

To create a template file prefix a file's content with {{=<% %>=}} and then create template values files with the following naming convention: <filename-with-extension>.<target-repo-name>.values.yml. The template values file should be a key value configuration of template values to replace. For example, given the following template file:

# template.yml
{{=<% %>=}}
name: example provider workflow <%> name %>

and values file

# template.yml.cq-provider-aws.values.yml
name: "aws"

When syncing files to the cq-provider-aws repositories, the synced file will have the content of:

# template.yml
name: example provider workflow aws

If a repository doesn't have a matching template values file, the file will not be synced.

Empty template placeholders

Some templates don't use any placeholders (values) but we still use an empty template placeholder {{=<% %>=}} in the file. With this, it's possible to enable/disable workflows depending on the existence of a template values file.

Repositories settings automation

See code here and configuration here.

We use a tool created by Google to sync settings between repositories. Example settings are enabling only squash merges, enforcing code reviews, etc.

See here for the default settings we use for providers.

Dependencies updates

We use renovate for dependency updates via a GitHub Action. All repositories (except this one) use a common file that extends various configurations.

As renovate runs in the context of this repository, it uses a self hosted renovate configuration file to generate the dependencies updates.

Auto-merging PRs

We use a GitHub application called Kodiak to allow auto-merging of PRs. The application will automatically merge any PRs that has the automerge label and all required conditions are met (e.g. review approved, status checks passed). The configuration for the application is synced to all repositories from this file.

We provide a manually triggered GitHub Action workflow to add the automerge label to PRs based on their title. You can trigger the workflow from here: image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.