Skip to content

add git-pr-check function to list GitHub pull requests in child directories #16

add git-pr-check function to list GitHub pull requests in child directories

add git-pr-check function to list GitHub pull requests in child directories #16

Workflow file for this run

name: Version Bump Check
on:
pull_request:
types: [opened, reopened, synchronize]
env:
FILE_PATH: '.cz.yaml' # Path to file with version string
VERSION_PATTERN: 'version: [0-9]\+\.[0-9]\+\.[0-9]\+' # Version string regex pattern
jobs:
version-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 2
- name: Check if Version String is Updated
run: |
if git diff -U0 --diff-filter 'AM' -r HEAD^1 HEAD -- "$FILE_PATH" | grep -q "$VERSION_PATTERN"; then
echo "##### ✅ Version updated in $FILE_PATH" >> "$GITHUB_STEP_SUMMARY"
else
echo "##### ❌ Version NOT updated in $FILE_PATH" >> "$GITHUB_STEP_SUMMARY"
exit 1
fi