mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
opencv_contrib fork usage in Github Actions (3.4 branch)
This commit is contained in:
parent
c677f132cd
commit
a848eccfc6
18
.github/workflows/PR-3.4-U20.yaml
vendored
18
.github/workflows/PR-3.4-U20.yaml
vendored
@ -49,8 +49,8 @@ jobs:
|
||||
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
|
||||
OPENCV_EXTRA_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true
|
||||
if [[ ! -z "$OPENCV_EXTRA_FORK" ]]; then
|
||||
echo "Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch"
|
||||
cd /opencv_extra
|
||||
git config user.email "opencv.ci"
|
||||
@ -169,7 +169,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_contrib
|
||||
run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_contrib.git /opencv_contrib
|
||||
run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} https://github.com/opencv/opencv_contrib.git /opencv_contrib
|
||||
- name: Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch
|
||||
run: |
|
||||
OPENCV_CONTRIB_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_contrib" "${{ env.SOURCE_BRANCH_NAME }}") || true
|
||||
if [[ ! -z "$OPENCV_CONTRIB_FORK" ]]; then
|
||||
echo "Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch"
|
||||
cd /opencv_contrib
|
||||
git config user.email "opencv.ci"
|
||||
git config user.name "opencv.ci"
|
||||
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_contrib" "${{ env.SOURCE_BRANCH_NAME }}"
|
||||
else
|
||||
echo "No merge since ${{ env.PR_AUTHOR }}/opencv_contrib does not have branch ${{ env.SOURCE_BRANCH_NAME }}"
|
||||
fi
|
||||
- name: Configure OpenCV Contrib
|
||||
run: |
|
||||
cd /opencv-contrib-build
|
||||
|
Loading…
Reference in New Issue
Block a user