Skip to content

Commit 7a7472e

Browse files
authored
Merge pull request #133 from synonymdev/feat/platform-base-branch-overrides
feat: add platform-specific base branch overrides
2 parents 38b946f + b1d9e48 commit 7a7472e

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/determine-e2e-branch.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,28 @@ jobs:
3030
APP_BRANCH="${{ inputs.app_branch }}"
3131
INPUT_BRANCH="${{ inputs.e2e_branch_input }}"
3232
TEST_REPO="synonymdev/bitkit-e2e-tests"
33+
CALLER_REPO="${{ github.repository }}"
34+
35+
# Platform-specific base branch overrides.
36+
# When a platform needs a different base than 'main', update it here.
37+
# Set both back to 'main' once platforms are aligned again.
38+
declare -A BASE_OVERRIDES=(
39+
["ios"]="feat/home-redesign"
40+
["android"]="main"
41+
)
42+
43+
PLATFORM=""
44+
if [[ "$CALLER_REPO" == */bitkit-ios ]]; then
45+
PLATFORM="ios"
46+
elif [[ "$CALLER_REPO" == */bitkit-android ]]; then
47+
PLATFORM="android"
48+
fi
49+
BASE_BRANCH="${BASE_OVERRIDES[$PLATFORM]:-main}"
3350
3451
echo "🧭 App branch: $APP_BRANCH"
3552
echo "🧭 Input branch: $INPUT_BRANCH"
53+
echo "🧭 Caller repo: $CALLER_REPO (platform: ${PLATFORM:-unknown})"
54+
echo "🧭 Base branch: $BASE_BRANCH"
3655
echo "🧭 Checking repo: $TEST_REPO"
3756
3857
if [[ "$INPUT_BRANCH" == "main" ]]; then
@@ -42,8 +61,8 @@ jobs:
4261
BRANCH="$APP_BRANCH"
4362
echo "✅ Found matching branch: $BRANCH"
4463
else
45-
BRANCH="main"
46-
echo "⚠️ No '$APP_BRANCH' branch in $TEST_REPO, using 'main'."
64+
BRANCH="$BASE_BRANCH"
65+
echo "⚠️ No '$APP_BRANCH' branch in $TEST_REPO, using '$BASE_BRANCH'."
4766
fi
4867
else
4968
if git ls-remote --exit-code https://github.com/$TEST_REPO.git "refs/heads/$INPUT_BRANCH" >/dev/null 2>&1; then

0 commit comments

Comments
 (0)