Skip to content

Commit

Permalink
Update version-check.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
naher94 authored Feb 13, 2024
1 parent 676bcb4 commit c5ab5a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ jobs:
- name: Check version increment
run: |
# Get the default branch name
DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
echo "Default branch is: $DEFAULT_BRANCH"
# Get the base commit SHA (where the branch started)
BASE_SHA=$(git merge-base $DEFAULT_BRANCH $GITHUB_SHA)
echo "Base SHA: $BASE_SHA"

# Check if 'config.yml' was modified in this pull request
if git diff --name-only $BASE_SHA $GITHUB_SHA | grep -q 'config.yml'; then
# Check if the version was incremented
Expand Down

0 comments on commit c5ab5a7

Please sign in to comment.