summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2026-04-01 19:17:55 +0100
committerAndrew Clayton <a.clayton@nginx.com>2026-04-13 14:20:23 +0100
commitb761b0485b5bdc49ce9124126530fe575eb80627 (patch)
tree020b7d9fadfc96134bc9b30b994bd732fd84a1a0
parent9772267278f07fd6c2bd66f22eefbae2acfa5e68 (diff)
downloadnginx-b761b0485b5bdc49ce9124126530fe575eb80627.tar.gz
nginx-b761b0485b5bdc49ce9124126530fe575eb80627.tar.bz2
GH: add a workflow to check for the 'version bump' commit
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.
-rw-r--r--.github/workflows/check-version-bump.yaml23
1 files changed, 23 insertions, 0 deletions
diff --git a/.github/workflows/check-version-bump.yaml b/.github/workflows/check-version-bump.yaml
new file mode 100644
index 000000000..d7e12c8e3
--- /dev/null
+++ b/.github/workflows/check-version-bump.yaml
@@ -0,0 +1,23 @@
+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