Skip to content

Commit 932dc5c

Browse files
Merge pull request #405 from rpodishe/OSD-28972-fix-automated-dependency-bumps-fail
OSD-28972 Added github action to auto tidy interceptor when cadctl mo…
2 parents 53d07dc + a251501 commit 932dc5c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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

0 commit comments

Comments
 (0)