From 5f7562f7ae9c31728496fd13710cbd63e0cdf351 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 9 Jul 2026 13:37:36 +0200 Subject: [PATCH] run only on the actual version when bumping --- .github/workflows/ci.yml | 1 + .github/workflows/create-unity-matrix.yml | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67e192314..75a1040e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: uses: ./.github/workflows/create-unity-matrix.yml with: event-name: ${{ github.event_name }} + head-ref: ${{ github.head_ref }} sdk: strategy: diff --git a/.github/workflows/create-unity-matrix.yml b/.github/workflows/create-unity-matrix.yml index 5ade8e564..3fffae108 100644 --- a/.github/workflows/create-unity-matrix.yml +++ b/.github/workflows/create-unity-matrix.yml @@ -7,6 +7,11 @@ on: description: 'Event name (pull_request, push, etc.)' required: true type: string + head-ref: + description: 'PR head branch name' + required: false + type: string + default: '' outputs: unity-matrix: description: 'Unity version matrix' @@ -29,10 +34,15 @@ jobs: shell: bash env: EVENT_NAME: ${{ inputs.event-name }} + HEAD_REF: ${{ inputs.head-ref }} PR_UNITY_VERSIONS_VALUE: ${{ env.PR_UNITY_VERSIONS }} FULL_UNITY_VERSIONS_VALUE: ${{ env.FULL_UNITY_VERSIONS }} run: | - if [[ "$EVENT_NAME" == "pull_request" ]]; then + # Unity-bump PRs follow the naming convention `chore/unity-` + # The bumps only need to run on those specific versions + if [[ "$EVENT_NAME" == "pull_request" && "$HEAD_REF" =~ ^chore/unity-([0-9]+\.[0-9]+)\. ]]; then + versions="[\"${BASH_REMATCH[1]}\"]" + elif [[ "$EVENT_NAME" == "pull_request" ]]; then versions="$PR_UNITY_VERSIONS_VALUE" else versions="$FULL_UNITY_VERSIONS_VALUE"