Skip to content

Commit 5de827b

Browse files
authored
ci: Add copywrite workflow and makefile target. (#43)
1 parent 280255f commit 5de827b

7 files changed

Lines changed: 53 additions & 0 deletions

File tree

.copywrite.hcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
schema_version = 1
2+
3+
project {
4+
license = "MIT"
5+
copyright_year = 2013
6+
}

.github/workflows/copywrite.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Check Copywrite Headers
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "main"
8+
9+
jobs:
10+
copywrite:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
14+
with:
15+
fetch-depth: 0
16+
- uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
17+
name: Setup Copywrite
18+
with:
19+
version: v0.25.3
20+
archive-checksum: e43f4b72fff3f219c5a5f883438d63edd5b68f5bea90a5d18abb3001c8c3aedc
21+
- name: Check Header Compliance
22+
run: make copywriteheaders
23+
permissions:
24+
contents: read

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
default: copywriteheaders
2+
3+
.PHONY: copywriteheaders
4+
copywriteheaders:
5+
@echo "==> Running copywrite headers plan..."
6+
@copywrite headers --plan
7+
@echo "==> Done"
8+
9+
.PHONY: deps
10+
deps:
11+
@go install github.com/hashicorp/copywrite@b3e6599f43beff698f471c6f46888045453fa030 # v0.25.3

codec/internal/testdata/raft.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright IBM Corp. 2013, 2026
2+
// SPDX-License-Identifier: MIT
3+
14
package testdata
25

36
import "time"

codec/internal/testdata/raft_v055.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright IBM Corp. 2013, 2026
2+
// SPDX-License-Identifier: MIT
3+
14
package testdata
25

36
import "time"

codec/internal/testdata/raft_v115.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright IBM Corp. 2013, 2026
2+
// SPDX-License-Identifier: MIT
3+
14
package testdata
25

36
import "time"

codec/internal/testdata/raft_v116.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright IBM Corp. 2013, 2026
2+
// SPDX-License-Identifier: MIT
3+
14
package testdata
25

36
import "time"

0 commit comments

Comments
 (0)