summaryrefslogtreecommitdiff
path: root/.github/workflows/check_commit_messages.yml
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2025-11-14 13:39:01 -0500
committerJacob Walls <jacobtylerwalls@gmail.com>2025-11-21 14:37:24 -0500
commite22a9332e3e277e565783ef977c08804a56de241 (patch)
tree243c9f423f43fdebe6e694e0846ae8eb12c93957 /.github/workflows/check_commit_messages.yml
parentabb9aab00e287b79fe6894ef66227f11d28924e0 (diff)
[6.0.x] Applied auto-fixes from zizmor findings.
Backport of e8958c4690faef27b6715524ecb5c49c3ecb6a09 from main.
Diffstat (limited to '.github/workflows/check_commit_messages.yml')
-rw-r--r--.github/workflows/check_commit_messages.yml13
1 files changed, 10 insertions, 3 deletions
diff --git a/.github/workflows/check_commit_messages.yml b/.github/workflows/check_commit_messages.yml
index 1a6d6d1958..e8a7059b0d 100644
--- a/.github/workflows/check_commit_messages.yml
+++ b/.github/workflows/check_commit_messages.yml
@@ -14,11 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
+ with:
+ persist-credentials: false
- name: Calculate commit prefix
id: vars
+ env:
+ GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
- BASE="${{ github.event.pull_request.base.ref }}"
+ BASE="${GITHUB_EVENT_PULL_REQUEST_BASE_REF}"
echo "BASE=$BASE" >> $GITHUB_ENV
VERSION="${BASE#stable/}"
echo "prefix=[$VERSION]" >> $GITHUB_OUTPUT
@@ -26,8 +30,9 @@ jobs:
- name: Check PR title prefix
env:
TITLE: ${{ github.event.pull_request.title }}
+ STEPS_VARS_OUTPUTS_PREFIX: ${{ steps.vars.outputs.prefix }}
run: |
- PREFIX="${{ steps.vars.outputs.prefix }}"
+ PREFIX="${STEPS_VARS_OUTPUTS_PREFIX}"
if [[ "$TITLE" != "$PREFIX"* ]]; then
echo "❌ PR title must start with the required prefix: $PREFIX"
exit 1
@@ -40,8 +45,10 @@ jobs:
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr
- name: Check commit messages prefix
+ env:
+ STEPS_VARS_OUTPUTS_PREFIX: ${{ steps.vars.outputs.prefix }}
run: |
- PREFIX="${{ steps.vars.outputs.prefix }}"
+ PREFIX="${STEPS_VARS_OUTPUTS_PREFIX}"
COMMITS=$(git rev-list base..pr)
echo "Checking commit messages for required prefix: $PREFIX"
FAIL=0