Skip to content

Commit bc75772

Browse files
committed
feat: add catalog version validation
1 parent b3db2f8 commit bc75772

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
version: ${{ steps.version.outputs.version }}
1919
values_version: ${{ steps.version.outputs.values_version }}
2020
chart_version: ${{ steps.version.outputs.chart_version }}
21+
catalog_version: ${{ steps.version.outputs.catalog_version }}
2122
steps:
2223
- name: 🛎️ Checkout
2324
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -29,6 +30,7 @@ jobs:
2930
echo "version=$(make print-VERSION | cut -d'=' -f2)" >> $GITHUB_OUTPUT
3031
echo "values_version=$(yq '.deployment.image.tag' chart/values.yaml)" >> $GITHUB_OUTPUT
3132
echo "chart_version=$(yq '.appVersion' chart/Chart.yaml)" >> $GITHUB_OUTPUT
33+
echo "catalog_version=$(yq '.spec.image' deploy/catalog_source.yaml | cut -d':' -f2)" >> $GITHUB_OUTPUT
3234
echo $GITHUB_OUTPUT
3335
3436
check:
@@ -42,6 +44,7 @@ jobs:
4244
echo "values_version: ${{ needs.release.outputs.values_version }}"
4345
echo "chart_version: ${{ needs.release.outputs.chart_version }}"
4446
echo "tag_name: ${{ github.event.release.tag_name }}"
47+
echo "catalog_version: ${{ needs.release.outputs.catalog_version }}"
4548
4649
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.version }}" ]; then
4750
echo "Version in Makefile does not match release tag"
@@ -58,6 +61,11 @@ jobs:
5861
exit 1
5962
fi
6063
64+
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.catalog_version }}" ]; then
65+
echo "Version in deploy/catalog_source.yaml does not match release tag"
66+
exit 1
67+
fi
68+
6169
6270
build:
6371
name: 🛠️ Build Operator images
@@ -88,4 +96,4 @@ jobs:
8896
make bundle-build bundle-push
8997
- name: 🏗️ Build and push Operator catalog
9098
run: |
91-
make catalog-build catalog-push
99+
make catalog-build catalog-push

0 commit comments

Comments
 (0)