Add operator bundle files for CI integration #70
Workflow file for this run
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
| name: "Verify generated files" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| verify-generation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install yq using apt | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y yq | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| - name: Install operator-sdk | |
| uses: redhat-actions/openshift-tools-installer@v1 | |
| with: | |
| source: github | |
| operator-sdk: 1.38.0 | |
| - name: Verify generated files are up to date and fail if anything changed | |
| run: | | |
| # We have to remember the createdAt value because make bundle updates | |
| # it in the CI which causes the git diff to value | |
| OLD_CREATED_AT=$( | |
| yq '.metadata.annotations.createdAt' \ | |
| bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml | |
| ) | |
| make generate | |
| make manifests | |
| make bundle | |
| yq -i ".metadata.annotations.createdAt = \"${OLD_CREATED_AT}\"" \ | |
| bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml | |
| git diff --exit-code |