diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 6f2da047..aacc2d1b 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -25,16 +25,20 @@ jobs: run: | # Check if 'config.yml' was modified in this pull request if git diff --name-only $DEFAULT_BRANCH HEAD | grep -q 'config.yml'; then + # Print the changes in 'config.yml' for debugging + git diff $DEFAULT_BRANCH HEAD 'config.yml' + # Check if the version was incremented if git diff $DEFAULT_BRANCH HEAD 'config.yml' | grep -E '^\+[[:space:]]+version:[[:space:]]+[0-9]+\.[0-9]+\.[0-9]+'; then echo "Version incremented. Check passed." else echo "Error: Version in 'config.yml' was not incremented. Please update the version before merging." - exit 1 # This line triggers a failure by exiting with a non-zero code + exit 1 fi else echo "Error: config.yml not modified in this pull request. Please make changes to config.yml before merging." - exit 1 # This line triggers a failure by exiting with a non-zero code + exit 1 fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +