Skip to content

Commit

Permalink
workflows: fix validate CRD by fetching all git repo history
Browse files Browse the repository at this point in the history
Also add a trigger on the workflow file to test.

Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy committed Feb 5, 2024
1 parent 02762ad commit 08cc290
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/validate-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ on:
paths:
- 'pkg/k8s/apis/cilium.io/client/crds/v1alpha1/*.yaml'
- 'pkg/k8s/apis/cilium.io/v1alpha1/version.go'
- '.github/workflows/validate-crd.yaml'

jobs:
check-version:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Check for CRD changes and version update
run: |
Expand Down Expand Up @@ -44,4 +47,4 @@ jobs:
if [ "$crd_changed" -eq 0 ] && [ "$version_changed" -eq 1 ]; then
echo "CustomResourceDefinitionSchemaVersion in pkg/k8s/apis/cilium.io/v1alpha1/version.go to be updated only in case of modifying the files pkg/k8s/apis/cilium.io/client/crds/v1alpha1/*.yaml"
exit 1
fi
fi

0 comments on commit 08cc290

Please sign in to comment.