diff --git a/.github/workflows/copywrite.yaml b/.github/workflows/copywrite.yaml new file mode 100644 index 0000000..b849fdb --- /dev/null +++ b/.github/workflows/copywrite.yaml @@ -0,0 +1,24 @@ +name: Check Copywrite Headers + +on: + pull_request: + push: + branches: + - "main" + +jobs: + copywrite: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + fetch-depth: 0 + - uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3 + name: Setup Copywrite + with: + version: v0.25.3 + archive-checksum: e43f4b72fff3f219c5a5f883438d63edd5b68f5bea90a5d18abb3001c8c3aedc + - name: Check Header Compliance + run: make copywriteheaders +permissions: + contents: read diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0a25f47 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +default: copywriteheaders + +.PHONY: copywriteheaders +copywriteheaders: + @echo "==> Running copywrite headers plan..." + @copywrite headers --plan + @echo "==> Done" + +.PHONY: deps +deps: + @go install github.com/hashicorp/copywrite@b3e6599f43beff698f471c6f46888045453fa030 # v0.25.3