Skip to content

Commit 9cbe82e

Browse files
feature(ci): Add GHA to check go mod tidy on PR
Signed-off-by: Marcus Brandenburger <[email protected]>
1 parent 8bde666 commit 9cbe82e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/git.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@ on: [pull_request]
55
jobs:
66
block-fixup:
77
runs-on: ubuntu-latest
8-
98
steps:
109
- uses: actions/checkout@v5
1110
- name: Block Fixup Commit Merge
1211
uses: 13rac1/[email protected]
12+
13+
go-mod-tidy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: actions/setup-go@v6
18+
with:
19+
go-version-file: "go.mod"
20+
cache-dependency-path: "**/*.sum"
21+
- run: make tidy
22+
- name: Check for diffs
23+
run: |
24+
git diff --exit-code || {
25+
echo "Please run 'make tidy' and commit the changes";
26+
exit 1;
27+
}

0 commit comments

Comments
 (0)