-
Notifications
You must be signed in to change notification settings - Fork 594
44 lines (38 loc) · 1.42 KB
/
regenerate_on_deps_bump.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This workflow will regenerate code and manifests, commit&push them on a PR labeled with `renovate/auto-regenerate`.
# It's to make sure that Renovate-created PRs that update dependencies that might affect generated code/manifests,
# will have them regenerated automatically.
name: Regenerate on deps bump
on:
pull_request:
types:
- labeled
jobs:
regenerate:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT || 10) }}
if: contains(github.event.*.labels.*.name, 'renovate/auto-regenerate')
runs-on: ubuntu-latest
env:
REF: ${{ github.event.pull_request.head.ref }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.REF }}
token: ${{ secrets.K8S_TEAM_BOT_GH_PAT }}
- name: setup golang
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
install: false
- name: regenerate
run: make generate manifests
- name: commit and push (if changes detected)
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add ./test/e2e/manifests ./config/crd
git status
git diff-index --quiet HEAD || \
git commit -m "chore: regenerate" && \
git push origin ${{ env.REF }}