File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will regenerate the manifests, commit&push them on a PR labeled with `renovate/auto-regenerate`.
2+ # It's to make sure that Renovate-created PRs that update kustomize dependencies also update the manifests.
3+ name : Regenerate on deps bump
4+
5+ on :
6+ pull_request :
7+ types :
8+ - labeled
9+
10+ jobs :
11+ regenerate :
12+ if : contains(github.event.*.labels.*.name, 'renovate/auto-regenerate')
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ ref : ${{ github.event.pull_request.head.ref }}
18+
19+ - name : setup golang
20+ uses : actions/setup-go@v4
21+ with :
22+ go-version-file : go.mod
23+
24+ - name : regenerate
25+ run : make manifests
26+
27+ - name : commit and push (if changes detected)
28+ env :
29+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30+ run : |
31+ git config --global user.name "github-actions"
32+ git config --global user.email "[email protected] " 33+ git add .
34+ git diff-index --quiet HEAD || \
35+ git commit -m "chore: regenerate manifests" && \
36+ git push origin ${{ github.event.pull_request.head.ref }}
Original file line number Diff line number Diff line change 3333 "matchUpdateTypes" : [" minor" ],
3434 "matchDepPatterns" : [" .*@only-patch" ],
3535 "enabled" : false
36+ },
37+ {
38+ "description" : " Add 'renovate/auto-regenerate' label to a PR if it changes kustomize files to trigger regenerate_on_deps_bump.yaml workflow." ,
39+ "matchManagers" : [" kustomize" ],
40+ "addLabels" : [" renovate/auto-regenerate" ]
3641 }
3742 ]
3843}
You can’t perform that action at this time.
0 commit comments