Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/Processors_CI_Workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,18 @@ jobs:

- name: Clone & Build knowhow-common dependency
run: |
git clone --branch ${{ github.event.pull_request.base.ref }} https://github.com/PublicisSapient/knowhow-common.git
SOURCE_BRANCH="${{ github.head_ref }}"
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"

echo "Checking if branch '$SOURCE_BRANCH' exists in knowhow-common repo..."
if git ls-remote --heads https://github.com/PublicisSapient/knowhow-common.git $SOURCE_BRANCH | grep $SOURCE_BRANCH; then
BRANCH_TO_CLONE=$SOURCE_BRANCH
else
echo "Branch '$SOURCE_BRANCH' not found. Falling back to target branch '$TARGET_BRANCH'."
BRANCH_TO_CLONE=$TARGET_BRANCH
fi

git clone --branch $BRANCH_TO_CLONE https://github.com/PublicisSapient/knowhow-common.git
cd knowhow-common
mvn clean install -Ddockerfile.skip=true -X

Expand Down