fluxcd / terraform-provider-flux

Terraform and OpenTofu provider for bootstrapping Flux

Home Page:https://registry.terraform.io/providers/fluxcd/flux/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automate copywrite headers

swade1987 opened this issue · comments

Leverage https://github.com/hashicorp/copywrite

Create a GH action job that essentially runs the following.

- run: go install github.com/hashicorp/copywrite@latest
- run: copywrite headers
- name: Check for Git Differences
  run: |
    git diff --compact-summary --exit-code || \
      (echo; echo "Unexpected difference in directories after adding copyright headers. Run 'copywrite headers' command and commit."; exit 1)

A lot of other upstream providers leverage this already, for example:

Closing need to re-think this approach.