-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into upgrade-kubernetes
- Loading branch information
Showing
1 changed file
with
9 additions
and
15 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 |
---|---|---|
@@ -1,15 +1,13 @@ | ||
name: Check PR | ||
name: Check for version Bump | ||
|
||
on: | ||
pull_request_target: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
verify-version-bump: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -38,7 +36,7 @@ jobs: | |
if: steps.changed-files.outputs.all_modified_files_count == '0' | ||
id: check_if_only_ignored | ||
run: | | ||
echo "msg=Version bump not required." >> $GITHUB_OUTPUT | ||
echo "Version bump not required." > comment.txt | ||
exit 0 | ||
- name: Get version from file | ||
|
@@ -58,19 +56,15 @@ jobs: | |
LAST_TAG="${{ steps.previoustag.outputs.tag }}" | ||
NEW_TAG="v${{ steps.get_version.outputs.version }}" | ||
RESULT=$(ci/assets/checksemver.sh ${NEW_TAG} ${LAST_TAG}) | ||
echo "============================================" | ||
if [ "${RESULT}" == "1" ]; then | ||
echo "msg=Version bump found." >> $GITHUB_OUTPUT | ||
echo "Version bump found." | ||
exit 0 | ||
elif [ "${RESULT}" == "0" ]; then | ||
echo "msg=Version bump did not happen. ${LAST_TAG} is the same as ${NEW_TAG}" >> $GITHUB_OUTPUT | ||
echo "Version bump did not happen. ${LAST_TAG} is the same as ${NEW_TAG}" | ||
exit 1 | ||
else | ||
echo "msg=Version bump did not happen. ${LAST_TAG} is higher than ${NEW_TAG}" >> $GITHUB_OUTPUT | ||
echo "Version bump did not happen. ${LAST_TAG} is higher than ${NEW_TAG}" | ||
exit 1 | ||
fi | ||
- uses: mshick/[email protected] | ||
if: always() | ||
continue-on-error: true # Currently this resource doesn't work as is with forks | ||
with: | ||
message: | | ||
${{ steps.check_if_only_ignored.outputs.msg || steps.check_vbump.outputs.msg }} | ||
echo "============================================" |