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 15:00:53 -0500
commit7e9f7bb669685c4daf6c9e6fea61339ce705f3e6 (patch)
tree9d3478832ca88beeee91ab01de1be710f3000922 /.github/workflows/check_commit_messages.yml
parent0f4d5303a28d6cb0f321b0a4d6363187ccfb903a (diff)
[4.2.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 8fc5dd5cdf..ab115d96be 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@v4
+ 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