Skip to content

Commit b8cfff3

Browse files
committed
Verify bundle files are up to date
Add 'make bundle' to the verification workflow to ensure bundle manifests stay synchronized with code changes.
1 parent 3762028 commit b8cfff3

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/verify-generation.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v5
1616

17+
- name: Install yq using apt
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y yq
21+
1722
- name: Set up Go
1823
uses: actions/setup-go@v6
1924

@@ -25,6 +30,18 @@ jobs:
2530

2631
- name: Verify generated files are up to date and fail if anything changed
2732
run: |
33+
# We have to remember the createdAt value because make bundle updates
34+
# it in the CI which causes the git diff to value
35+
OLD_CREATED_AT=$(
36+
yq '.metadata.annotations.createdAt' \
37+
bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml
38+
)
39+
2840
make generate
2941
make manifests
42+
make bundle
43+
44+
yq -i ".metadata.annotations.createdAt = \"${OLD_CREATED_AT}\"" \
45+
bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml
46+
3047
git diff --exit-code

0 commit comments

Comments
 (0)