external-dns/.github/workflows/validate-crd.yml
dependabot[bot] e8479db7f9
chore(deps): bump the dev-dependencies group with 5 updates (#6330)
Bumps the dev-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `6.0.1` | `6.0.2` |
| [actions/setup-go](https://github.com/actions/setup-go) | `6.3.0` | `6.4.0` |
| [renovatebot/github-action](https://github.com/renovatebot/github-action) | `46.1.4` | `46.1.7` |
| [actions/setup-python](https://github.com/actions/setup-python) | `6.0.0` | `6.2.0` |
| [azure/setup-helm](https://github.com/azure/setup-helm) | `4.3.1` | `5.0.0` |


Updates `actions/checkout` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6.0.1...de0fac2e4500dabe0009e67214ff5f5447ce83dd)

Updates `actions/setup-go` from 6.3.0 to 6.4.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v6.3.0...v6.4.0)

Updates `renovatebot/github-action` from 46.1.4 to 46.1.7
- [Release notes](https://github.com/renovatebot/github-action/releases)
- [Changelog](https://github.com/renovatebot/github-action/blob/main/CHANGELOG.md)
- [Commits](0b17c4eb90...3633cede7d)

Updates `actions/setup-python` from 6.0.0 to 6.2.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v6...a309ff8b426b58ec0e2a45f0f869d46889d02405)

Updates `azure/setup-helm` from 4.3.1 to 5.0.0
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md)
- [Commits](1a275c3b69...dda3372f75)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: actions/setup-go
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: renovatebot/github-action
  dependency-version: 46.1.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: actions/setup-python
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: azure/setup-helm
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 12:54:14 +05:30

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # 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"