CRD sync check #1490
This file contains hidden or 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
# a simple boolean to check of a CRD sync check is needed | |
name: CRD sync check | |
on: | |
schedule: | |
- cron: '0 */2 * * *' # every 2 hours | |
workflow_dispatch: | |
inputs: | |
branch_name: | |
default: 'main' | |
type: string | |
workflow_call: | |
inputs: | |
branch_name: | |
default: 'main' | |
type: string | |
jobs: | |
crd-sync-check: | |
if: github.repository_owner == 'openstack-k8s-operators' | |
name: CRD sync check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set branch | |
id: set_branch | |
run: | | |
BRANCH_NAME="${{ inputs.branch_name || github.ref_name }}" | |
echo "branch name set to: $BRANCH_NAME" | |
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ steps.set_branch.outputs.branch_name }} | |
- name: run make force-bump | |
shell: bash | |
run: | | |
BRANCH='${{ steps.set_branch.outputs.branch_name }}' make force-bump | |
- name: run make bindata | |
shell: bash | |
run: | | |
make bindata | |
- name: Fail if there are local CRD changes in bindata/crds | |
run: | | |
git diff --quiet bindata/crds |