Skip to content

Commit 6e803a1

Browse files
authored
Merge pull request #11027 from spowelljr/detectGoSumChanges
Detect if go.sum changed after running go mod tidy
2 parents 5651730 + b1a0d95 commit 6e803a1

File tree

5 files changed

+5
-1
lines changed

5 files changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- master
66
paths:
7+
- "go.mod"
78
- "**.go"
89
- "Makefile"
910
- "!deploy/kicbase/**"

.github/workflows/master.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- master
66
paths:
7+
- "go.mod"
78
- "**.go"
89
- "**.yml"
910
- "**.yaml"

.github/workflows/pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: PR
22
on:
33
pull_request:
44
paths:
5+
- "go.mod"
56
- "**.go"
67
- "**.yml"
78
- "**.yaml"

.github/workflows/pr_verified.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: PR_Verified
22
on:
33
pull_request:
44
paths:
5+
- "go.mod"
56
- "**.go"
67
- "**.yml"
78
- "**.yaml"

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ then
2525
make -s lint-ci && echo ok || ((exitcode += 4))
2626
echo "= go mod ================================================================"
2727
go mod download 2>&1 | grep -v "go: finding" || true
28-
go mod tidy -v && echo ok || ((exitcode += 2))
28+
go mod tidy -v && git diff --quiet && echo ok || (((exitcode += 2)) && echo ERROR: Please run go mod tidy)
2929
fi
3030

3131

0 commit comments

Comments
 (0)