Skip to content

Fix the OCP directory to use _ instead of - #262

Fix the OCP directory to use _ instead of -

Fix the OCP directory to use _ instead of - #262

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: 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: |
# Preserve the .metadata.annotations.createdAt value from the CSV file,
# because running 'make bundle' updates this timestamp automatically.
# This can cause 'git diff --exit-code' to fail, even if there are
# no meaningful changes (i.e., the PR author already updated the bundle
# files correctly).
OLD_CREATED_AT=$(
grep 'createdAt:' bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml \
| sed 's/.*createdAt: "\(.*\)"/\1/'
)
make generate
make manifests
make bundle
sed -i "s/createdAt: .*/createdAt: \"${OLD_CREATED_AT}\"/" \
bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml
git diff --exit-code