diff --git a/.github/workflows/check-codegen.yml b/.github/workflows/check-codegen.yml new file mode 100644 index 000000000..49e41408e --- /dev/null +++ b/.github/workflows/check-codegen.yml @@ -0,0 +1,24 @@ +name: Check Codegen + +on: + pull_request: + paths-ignore: + - 'docs/**' + - '**/*.md' + +jobs: + check-codegen: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v2 + with: + go-version: '1.17' + - name: Run make generate + run: make generate + - name: Check if there are changes + id: changes + uses: UnicornGlobal/has-changes-action@v1.0.11 + - name: Process changes + if: steps.changes.outputs.changed == 1 + run: echo "Please run 'make generate' and commit the generated code." diff --git a/apis/compute/machine_types.go b/apis/compute/machine_types.go index ae13ed3b8..2cfbf6892 100644 --- a/apis/compute/machine_types.go +++ b/apis/compute/machine_types.go @@ -25,6 +25,8 @@ import ( // MachineSpec defines the desired state of Machine type MachineSpec struct { + // Foo + Foo string // MachineClassRef is a reference to the machine class/flavor of the machine. MachineClassRef corev1.LocalObjectReference // MachinePoolSelector selects a suitable MachinePoolRef by the given labels. diff --git a/apis/compute/v1alpha1/machine_types.go b/apis/compute/v1alpha1/machine_types.go index e271c5c47..59e286942 100644 --- a/apis/compute/v1alpha1/machine_types.go +++ b/apis/compute/v1alpha1/machine_types.go @@ -25,6 +25,8 @@ import ( // MachineSpec defines the desired state of Machine type MachineSpec struct { + // Foo + Foo string `json:"foo,omitempty"` // MachineClassRef is a reference to the machine class/flavor of the machine. MachineClassRef corev1.LocalObjectReference `json:"machineClassRef"` // MachinePoolSelector selects a suitable MachinePoolRef by the given labels.