Merge pull request #6158 from leseb/workflow-make-codegen

ci: run make codegen validation in workflow
This commit is contained in:
Sébastien Han authored and GitHub committed 2020-08-25 19:27:29 +02:00
commit fed4775a9b
3 files changed
+40

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
name: Codegen
on: [pull_request]
jobs:
codegen:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- uses: actions/setup-go@v2
with:
go-version: 1.13
- name: run codegen
run: GOPATH=$(go env GOPATH) make codegen
- name: validate codegen
run: hack/validate-codegen.sh
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
set -ex
for file in $(git status --porcelain); do
if [[ "$file" =~ "zz" ]]; then
echo "found codegen files!"
echo "please run 'make codegen' and update your PR"
exit 1
fi
done
@@ -428,6 +428,11 @@ func (in *StorageClassDeviceSet) DeepCopyInto(out *StorageClassDeviceSet) {
*out = *in
in.Resources.DeepCopyInto(&out.Resources)
in.Placement.DeepCopyInto(&out.Placement)
if in.PreparePlacement != nil {
in, out := &in.PreparePlacement, &out.PreparePlacement
*out = new(Placement)
(*in).DeepCopyInto(*out)
}
if in.Config != nil {
in, out := &in.Config, &out.Config
*out = make(map[string]string, len(*in))
@@ -512,6 +517,11 @@ func (in *VolumeSource) DeepCopyInto(out *VolumeSource) {
}
in.Resources.DeepCopyInto(&out.Resources)
in.Placement.DeepCopyInto(&out.Placement)
if in.PreparePlacement != nil {
in, out := &in.PreparePlacement, &out.PreparePlacement
*out = new(Placement)
(*in).DeepCopyInto(*out)
}
if in.Config != nil {
in, out := &in.Config, &out.Config
*out = make(map[string]string, len(*in))