mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 03:34:15 -06:00
38 lines
807 B
YAML
38 lines
807 B
YAML
name: "K8s Codegen Check"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "pkg/apis/**"
|
|
- "pkg/aggregator/apis/**"
|
|
- "pkg/apimachinery/apis/**"
|
|
- "hack/**"
|
|
- "*.sum"
|
|
|
|
jobs:
|
|
check:
|
|
name: K8s Codegen Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set go version
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Update k8s codegen
|
|
run: ./hack/update-codegen.sh
|
|
|
|
- name: Check for k8s codegen changes
|
|
run: |
|
|
if ! git diff --exit-code --quiet; then
|
|
echo "Changes detected:"
|
|
git diff
|
|
echo "Please run './hack/update-codegen.sh' and commit the changes."
|
|
exit 1
|
|
fi |