chore: improved validate ci #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate controller | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
run-controller: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create k8s Kind Cluster | |
uses: helm/[email protected] | |
- name: Generate CRD | |
run: cargo run --bin=crdgen >> crd.yaml | |
- name: Apply CRD | |
run: kubectl apply -f crd.yaml | |
- name: Build Controller | |
run: docker build -t ext-cardano-dbsync:latest . | |
- name: Apply manifests | |
run: | | |
kubectl apply -f test/manifest.yaml | |
kubectl apply -f test/dbsyncport.yaml | |
- name: Validate if CRD is working | |
run: | | |
counter=0; while ((counter++ < 5)); do kubectl get pod -n project; sleep 2; done; | |