mirror of
https://github.com/nginx/nginx.git
synced 2026-05-13 09:36:42 +00:00
This checks pull-requests to make sure the 'Version bump' commit is immediately after the last release commit/tag. The check includes the commits in the pull-request, so if a pull-request is adding this commit it will accept it and also if there are other commits in the pull-request, as long as the 'Version bump' commit is first.
23 lines
656 B
YAML
23 lines
656 B
YAML
name: Check Version Bump
|
|
|
|
on:
|
|
pull_request:
|
|
types: [ opened, synchronize ]
|
|
|
|
jobs:
|
|
check-version-bump:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Check git log
|
|
run: |
|
|
echo "## Check for 'Version bump' commit" >${GITHUB_STEP_SUMMARY}
|
|
subj=$(git log --format=%s $(git describe --abbrev=0 --tags).. | tail -1)
|
|
if ! expr "$subj" : 'Version bump' >/dev/null
|
|
then
|
|
echo "❌ No 'Version bump' commit immediately after release tag" | tee -a ${GITHUB_STEP_SUMMARY}
|
|
exit 2
|
|
fi
|