From 95d900d342c38ed9945adf06680805b9baaec1a7 Mon Sep 17 00:00:00 2001 From: Michal Pryc Date: Mon, 22 Apr 2024 15:53:14 +0200 Subject: [PATCH] Modify workflow to ensure VERSION is correct (#1131) Signed-off-by: Michal Pryc --- .github/workflows/cd.yml | 2 +- .github/workflows/test-images.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index bab91c1d..36088679 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -47,7 +47,7 @@ jobs: else echo "tags=$(echo stable,latest,${{ github.sha }},v$CURRENT_CHART_VERSION)" >> "$GITHUB_OUTPUT" echo is_release=true >> "$GITHUB_OUTPUT" - export CURRENT_OPERATOR_VERSION="$(grep "VERSION ?= " pelorus-operator/Makefile | cut -c 12-)" + export CURRENT_OPERATOR_VERSION="$(grep "^VERSION ?= " pelorus-operator/Makefile | cut -c 12-)" echo version=$CURRENT_OPERATOR_VERSION >> "$GITHUB_OUTPUT" fi else diff --git a/.github/workflows/test-images.yml b/.github/workflows/test-images.yml index 8575cbb3..fb5a3204 100644 --- a/.github/workflows/test-images.yml +++ b/.github/workflows/test-images.yml @@ -78,7 +78,7 @@ jobs: TEST_VERSION: pr${{ needs.setup.outputs.pr_number }}-${{ needs.setup.outputs.commit_hash }} working-directory: ./pelorus-operator run: | - export CURRENT_OPERATOR_VERSION="$(grep "VERSION ?= " Makefile | cut -c 12-)" + export CURRENT_OPERATOR_VERSION="$(grep "^VERSION ?= " Makefile | cut -c 12-)" export CURRENT_CHART_VERSION="$(grep '^version: ' helm-charts/pelorus/Chart.yaml | cut -c 10-)" export DEFAULT_OPERATOR_IMAGE="${{ env.REPOSITORY }}/pelorus-operator:$CURRENT_OPERATOR_VERSION" export TEST_OPERATOR_IMAGE="${{ env.REPOSITORY }}/rc-pelorus-operator:${{ env.TEST_VERSION }}"