Skip to content

Commit

Permalink
include primary group
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Jan 10, 2025
1 parent 7b87c88 commit 3cf056c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/reusable_build_sample_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,23 @@ jobs:
ALL_BUILDS_GROUP="all-builds"
FEATURE_BUILDS_GROUP="feature-branch"
STABLE_BUILDS_GROUP="next"
PUBLIC_BUILDS_GROUP="public"
# Initialize with the default distribution group
distribution_groups=("$ALL_BUILDS_GROUP")
# Determine current app type and Git context
is_primary_app=$([[ "${{ matrix.sample-app }}" == "java_layout" ]] && echo "true" || echo "false")
current_branch="${GITHUB_REF}"
use_latest_sdk_version="${{ inputs.use_latest_sdk_version }}"
# Append distribution groups based on branch and context if the app is primary
if [[ "$is_primary_app" == "true" ]]; then
[[ "$current_branch" == "refs/heads/feature/"* ]] && distribution_groups+=("$FEATURE_BUILDS_GROUP")
[[ "$current_branch" == "refs/heads/main" ]] && distribution_groups+=("$STABLE_BUILDS_GROUP")
if [[ "$use_latest_sdk_version" == "true" ]]; then
distribution_groups+=("$PUBLIC_BUILDS_GROUP")
fi
fi
# Export the groups as an environment variable
Expand Down

0 comments on commit 3cf056c

Please sign in to comment.