File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ name : go mod tidy
2+
3+ " on " :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ jobs :
9+ gomod-tidy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
16+ - name : Set up Go
17+ uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
18+ with :
19+ go-version-file : go.mod
20+
21+ - name : Check if dependencies are tidy
22+ run : |
23+ #!/bin/bash
24+ set -o errexit -o nounset -o pipefail
25+
26+ go mod tidy
27+
28+ if ! git diff --quiet; then
29+ git diff --color
30+ echo "::error::go mod tidy made changes"
31+ echo "Please run 'go mod tidy' and commit the changes."
32+ exit 1
33+ fi
Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://docs.renovatebot.com/renovate-schema.json" ,
33 "extends" : [
4- " config:recommended"
4+ " config:recommended" ,
5+ " helpers:pinGitHubActionDigestsToSemver"
56 ],
67 "packageRules" : [
78 {
You can’t perform that action at this time.
0 commit comments