CI: move workflows/actions to actions (#104711)
* move workflows/actions to actions
* rerun actions
* fix setup-go v5
* unpinned unnecessary pins
* update CODEOWONERS
* update CODEOWONERS
* remove remove-milestone from codeowners
* remove bad key
(cherry picked from commit 2436b4e097)
42 lines
911 B
YAML
42 lines
911 B
YAML
name: "K8s Codegen Check"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "pkg/apis/**"
|
|
- "pkg/aggregator/apis/**"
|
|
- "pkg/apimachinery/apis/**"
|
|
- "hack/**"
|
|
- "apps/**"
|
|
- "*.sum"
|
|
|
|
jobs:
|
|
check:
|
|
name: K8s Codegen Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set go version
|
|
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639
|
|
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
|