Skip to content

Commit

Permalink
Merge branch 'main' into upgrade-kubernetes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 authored Mar 28, 2024
2 parents 969bfa2 + ae18456 commit 32a2fca
Showing 1 changed file with 9 additions and 15 deletions.
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
Expand Down Expand Up @@ -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
Expand All @@ -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 "============================================"

0 comments on commit 32a2fca

Please sign in to comment.