From cde095a9309c4c7b59438df8fd23c673d732979c Mon Sep 17 00:00:00 2001 From: cheezwiz7899 Date: Wed, 6 May 2026 13:26:54 +1200 Subject: [PATCH] fix linux build branch targeting --- .github/workflows/build-linux.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 05024bc..27cc1b0 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -172,7 +172,7 @@ jobs: build: name: "${{ matrix.name }}" needs: [check-version, comment-start] - if: always() && needs.check-version.outputs.should_build == 'true' + if: needs.check-version.outputs.should_build == 'true' runs-on: ${{ matrix.os }} timeout-minutes: 120 strategy: @@ -208,8 +208,12 @@ jobs: shell: bash run: | CLONE_REPO="${{ needs.check-version.outputs.head_repo }}" - if [[ "$CLONE_REPO" != *"/"* ]]; then CLONE_REPO="${{ env.UPSTREAM_REPO }}"; fi - git clone --recurse-submodules --shallow-submodules --depth 1 -b "${{ needs.check-version.outputs.branch_name }}" "https://github.com/${CLONE_REPO}.git" emulator + BRANCH_NAME="${{ needs.check-version.outputs.branch_name }}" + if [ -z "$CLONE_REPO" ] || [[ "$CLONE_REPO" != *"/"* ]]; then CLONE_REPO="${{ env.UPSTREAM_REPO }}"; fi + if [ -z "$BRANCH_NAME" ]; then BRANCH_NAME="main"; fi + + echo "Cloning from $CLONE_REPO (branch: $BRANCH_NAME)..." + git clone --recurse-submodules --shallow-submodules --depth 1 -b "$BRANCH_NAME" "https://github.com/${CLONE_REPO}.git" emulator - name: Prepare Build Environment run: |