File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Auto tidy interceptor after cadctl changes
2
+
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - ' go.mod'
7
+ - ' go.sum'
8
+ - ' **/*.go'
9
+ - ' !interceptor/**'
10
+
11
+ jobs :
12
+ tidy :
13
+ runs-on : ubuntu-latest
14
+ if : github.actor != 'dependabot[bot]'
15
+ steps :
16
+ - name : Checkout the repository
17
+ uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 0
20
+
21
+ - name : Set up Go
22
+ uses : actions/setup-go@v5
23
+ with :
24
+ go-version : ' stable'
25
+
26
+ - name : Run go mod tidy in interceptor
27
+ working-directory : interceptor
28
+ run : |
29
+ go mod tidy
30
+ git diff
31
+ if [[ -n "$(git status --porcelain)" ]]; then
32
+ git config user.name "github-actions[bot]"
33
+ git config user.email "github-actions[bot]@users.noreply.github.com"
34
+ git add go.mod go.sum
35
+ git commit -m "On PR: tidy interceptor go.mod after cadctl go.mod update"
36
+ git push
37
+ fi
You can’t perform that action at this time.
0 commit comments