Skip to content

Commit

Permalink
CLOUDP-210137: Stop release branch if major version is wrong
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Vazquez <[email protected]>
  • Loading branch information
josvazg committed Nov 16, 2023
1 parent e4a4484 commit 45d0f59
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/post-atlas-operator-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push branch
run: |
export VERSION=${{ github.event.inputs.version }}
export MAJOR_VERSION=$(cat operator/mongodb-atlas-kubernetes/major-version)
## Check that VERSION starts with MAJOR_VERSION
if [[ ${VERSION} == ${MAJOR_VERSION}.* ]]; then
echo "Version OK";
else
echo "Bad major version for ${VERSION}, expected ${MAJOR_VERSION}.x.y";
exit 1
fi
cp helm/helm-charts/.github/actions/push-files/push-files.sh helm/helm-charts
cd helm/helm-charts
chmod +x push-files.sh
Expand Down

0 comments on commit 45d0f59

Please sign in to comment.