🐛 fix(ci): version-bump fallback for workflow_dispatch trigger #31

Merged
arcodange merged 1 commits from fix/ci-version-bump-workflow-dispatch into main 2026-05-03 16:42:25 +02:00
Showing only changes of commit 3e20362daf - Show all commits

View File

@@ -297,7 +297,14 @@ jobs:
# Check for version bump on main branch
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
echo "🔖 Checking for version bump..."
./scripts/ci-version-bump.sh "${{ github.event.head_commit.message }}" --no-push
# ${{ github.event.head_commit.message }} is empty on workflow_dispatch (manual trigger).
# Fall back to the latest commit message from `git log` so the script always has input.
COMMIT_MSG="${{ github.event.head_commit.message }}"
if [ -z "$COMMIT_MSG" ]; then
COMMIT_MSG=$(git log -1 --pretty=%B)
echo " (using git log -1 because head_commit.message is empty - probably workflow_dispatch)"
fi
./scripts/ci-version-bump.sh "$COMMIT_MSG" --no-push
fi
# Single push for all commits (this is the ONLY push in the entire workflow)