mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2026-04-16 05:21:01 +02:00
Bumps the dev-dependencies group with 3 updates in the / directory: [actions/setup-go](https://github.com/actions/setup-go), [renovatebot/github-action](https://github.com/renovatebot/github-action) and [helm/kind-action](https://github.com/helm/kind-action).
Updates `actions/setup-go` from 6.2.0 to 6.3.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v6.2.0...v6.3.0)
Updates `renovatebot/github-action` from 44.2.4 to 46.1.2
- [Release notes](https://github.com/renovatebot/github-action/releases)
- [Changelog](https://github.com/renovatebot/github-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/renovatebot/github-action/compare/v44.2.4...v46.1.2)
Updates `helm/kind-action` from 1.13.0 to 1.14.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](92086f6be0...ef37e7f390)
---
updated-dependencies:
- dependency-name: actions/setup-go
dependency-version: 6.3.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dev-dependencies
- dependency-name: renovatebot/github-action
dependency-version: 46.1.2
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: dev-dependencies
- dependency-name: helm/kind-action
dependency-version: 1.14.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dev-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
name: Validate CRD Generation
|
|
|
|
# This workflow validates that generated CRD files are up-to-date when tool
|
|
# dependencies change. It ensures that if go.tool.mod or go.tool.sum are updated,
|
|
# the corresponding generated files (CRDs and deepcopy code) are also regenerated
|
|
# and committed in the same PR.
|
|
#
|
|
# Why this is needed:
|
|
# - controller-gen (from go.tool.mod) generates CRD YAML and deepcopy Go code
|
|
# - Different versions of controller-gen may produce different output
|
|
# - When tool versions change, generated code must be regenerated
|
|
# - This prevents CI failures and runtime issues from stale generated code
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'go.tool.mod'
|
|
- 'go.tool.sum'
|
|
- 'scripts/generate-crd.sh'
|
|
- '**/dnsendpoints.externaldns.k8s.io.yaml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate-crd:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@def8c394e3ad351a79bc93815e4a585520fe993b # v6.2.0
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Regenerate CRDs
|
|
run: ./scripts/generate-crd.sh
|
|
|
|
- name: Check for uncommitted changes
|
|
id: check_changes
|
|
run: |
|
|
# Check if there are any changes to generated files
|
|
if ! git diff --quiet; then
|
|
echo "::error::Generated CRD files are out of sync with go.tool.mod"
|
|
echo ""
|
|
echo "The following files have uncommitted changes after running 'make crd':"
|
|
git diff .
|
|
echo ""
|
|
echo "This usually means:"
|
|
echo "1. go.tool.mod or go.tool.sum was updated (new controller-gen version)"
|
|
echo "2. The generated CRD files were not regenerated"
|
|
echo ""
|
|
echo "To fix this:"
|
|
echo " make crd"
|
|
echo " git diff ."
|
|
echo " commit, push and update your PR:"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Success
|
|
if: success()
|
|
run: |
|
|
echo "✅ Generated CRD files are up-to-date"
|