Skip to content

Commit 73673b5

Browse files
authored
Merge pull request #12 from PublicisSapient/test-github-actions
Test GitHub actions
2 parents c283805 + bd3026d commit 73673b5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/Processors_CI_Workflow.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,18 @@ jobs:
4949
5050
- name: Clone & Build knowhow-common dependency
5151
run: |
52-
git clone --branch ${{ github.event.pull_request.base.ref }} https://github.com/PublicisSapient/knowhow-common.git
52+
SOURCE_BRANCH="${{ github.head_ref }}"
53+
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"
54+
55+
echo "Checking if branch '$SOURCE_BRANCH' exists in knowhow-common repo..."
56+
if git ls-remote --heads https://github.com/PublicisSapient/knowhow-common.git $SOURCE_BRANCH | grep $SOURCE_BRANCH; then
57+
BRANCH_TO_CLONE=$SOURCE_BRANCH
58+
else
59+
echo "Branch '$SOURCE_BRANCH' not found. Falling back to target branch '$TARGET_BRANCH'."
60+
BRANCH_TO_CLONE=$TARGET_BRANCH
61+
fi
62+
63+
git clone --branch $BRANCH_TO_CLONE https://github.com/PublicisSapient/knowhow-common.git
5364
cd knowhow-common
5465
mvn clean install -Ddockerfile.skip=true -X
5566

0 commit comments

Comments
 (0)