From a06cccc8252fdd037ee5f31b6548b48d421f1406 Mon Sep 17 00:00:00 2001 From: istarkov Date: Fri, 31 Jan 2025 16:34:08 +0000 Subject: [PATCH] Check --- .github/actions/submodules-checkout/action.yml | 4 ++-- .github/workflows/check-submodules.yml | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/submodules-checkout/action.yml b/.github/actions/submodules-checkout/action.yml index e92fb69d30b7..0b47233e94ce 100644 --- a/.github/actions/submodules-checkout/action.yml +++ b/.github/actions/submodules-checkout/action.yml @@ -30,13 +30,13 @@ runs: - name: Verify SSH Connection (Optional) if: ${{ inputs.submodules-ssh-key }} run: | - echo Branch is ${{ github.ref_name }} + echo Branch is ${{ github.event.pull_request.head.ref || github.ref_name }} shell: bash - name: Try checkout submodules to the same branch as main repo if: ${{ inputs.submodules-ssh-key }} run: | - ./submodules.sh ${{ github.ref_name }} + ./submodules.sh ${{ github.event.pull_request.head.ref || github.ref_name }} shell: bash - name: Show main readme diff --git a/.github/workflows/check-submodules.yml b/.github/workflows/check-submodules.yml index 64ee16ed3d87..29363f5c935f 100644 --- a/.github/workflows/check-submodules.yml +++ b/.github/workflows/check-submodules.yml @@ -37,7 +37,9 @@ jobs: run: | echo "C ${{ github.workflow }}-${{ github.event.number || github.sha }}" # Get the current branch or tag name - REF_NAME="${{ github.ref_name }}" + REF_NAME="${{ github.event.pull_request.head.ref }}" + + echo "Branch is:" $REF_NAME # List all submodule paths SUBMODULES=$(git submodule status | awk '{print $2}')