Skip to content

chore(generators): make file naming uniform zz_generated.* #2893

chore(generators): make file naming uniform zz_generated.*

chore(generators): make file naming uniform zz_generated.* #2893

# 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
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.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@v2
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 ${{ github.event.pull_request.head.ref }}