From 8c42dbf71c424fbd500fa8ada772e4371d52abaf Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Tue, 26 Apr 2022 14:05:21 +0300 Subject: [PATCH] opencv_extra fork usage in Github Actions --- .github/workflows/PR-3.4-U20.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PR-3.4-U20.yaml b/.github/workflows/PR-3.4-U20.yaml index 1c4cb91b36..e87deddd9d 100644 --- a/.github/workflows/PR-3.4-U20.yaml +++ b/.github/workflows/PR-3.4-U20.yaml @@ -46,7 +46,19 @@ jobs: git config user.name "opencv.ci" git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" - name: Clone opencv_extra - run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_extra.git /opencv_extra + run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} https://github.com/opencv/opencv_extra.git /opencv_extra + - name: Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch + run: | + RET=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true + if [[ ! -z "$RET" ]]; then + echo "Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch" + cd /opencv_extra + git config user.email "opencv.ci" + git config user.name "opencv.ci" + git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}" + else + echo "No merge since ${{ env.PR_AUTHOR }}/opencv_extra does not have branch ${{ env.SOURCE_BRANCH_NAME }}" + fi - name: Configure OpenCV run: | cd /opencv-build