-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/pod-template
Signed-off-by: Chaoran Yu <yuchaoran2011@gmail.com>
- Loading branch information
Showing
40 changed files
with
894 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Check Release | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- release-* | ||
paths: | ||
- VERSION | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
SEMVER_PATTERN: '^v([0-9]+)\.([0-9]+)\.([0-9]+)(-rc\.([0-9]+))?$' | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check whether version matches semver pattern | ||
run: | | ||
VERSION=$(cat VERSION) | ||
if [[ ${VERSION} =~ ${{ env.SEMVER_PATTERN }} ]]; then | ||
echo "Version '${VERSION}' matches semver pattern." | ||
else | ||
echo "Version '${VERSION}' does not match semver pattern." | ||
exit 1 | ||
fi | ||
echo "VERSION=${VERSION}" >> $GITHUB_ENV | ||
- name: Check whether chart version and appVersion matches version | ||
run: | | ||
VERSION=${VERSION#v} | ||
CHART_VERSION=$(cat charts/spark-operator-chart/Chart.yaml | grep version | awk '{print $2}') | ||
CHART_APP_VERSION=$(cat charts/spark-operator-chart/Chart.yaml | grep appVersion | awk '{print $2}') | ||
if [[ ${CHART_VERSION} == ${VERSION} ]]; then | ||
echo "Chart version '${CHART_VERSION}' matches version '${VERSION}'." | ||
else | ||
echo "Chart version '${CHART_VERSION}' does not match version '${VERSION}'." | ||
exit 1 | ||
fi | ||
if [[ ${CHART_APP_VERSION} == ${VERSION} ]]; then | ||
echo "Chart appVersion '${CHART_APP_VERSION}' matches version '${VERSION}'." | ||
else | ||
echo "Chart appVersion '${CHART_APP_VERSION}' does not match version '${VERSION}'." | ||
exit 1 | ||
fi | ||
- name: Check if tag exists | ||
run: | | ||
git fetch --tags | ||
if git tag -l | grep -q "^${VERSION}$"; then | ||
echo "Tag '${VERSION}' already exists." | ||
exit 1 | ||
else | ||
echo "Tag '${VERSION}' does not exist." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.