|
13 | 13 | # - GITHUB_PAT: GitHub Personal Access Token |
14 | 14 | # - DOCKER_USER: Docker Hub username |
15 | 15 | # - DOCKER_PASS: Docker Hub password |
16 | | -# - TEAM: Team name (frontend/backend/cross-platform) |
17 | 16 |
|
18 | | -if [ "${TEAM}" = "cross-platform" ]; then |
| 17 | +if [ "${REPO_NAME}" = "cross-platform" ]; then |
19 | 18 | echo "Building cross-platform Flutter app..." |
20 | 19 |
|
21 | 20 | # Navigate to app directory |
@@ -48,14 +47,14 @@ if [ "${TEAM}" = "cross-platform" ]; then |
48 | 47 |
|
49 | 48 | else |
50 | 49 | # Docker build for frontend/backend |
51 | | - echo "Building ${TEAM} Docker image..." |
| 50 | + echo "Building ${REPO_NAME} Docker image..." |
52 | 51 |
|
53 | 52 | # Navigate to app directory |
54 | 53 | cd ../app |
55 | 54 |
|
56 | 55 | # Build Docker image with commit SHA + environment tag |
57 | 56 | # For frontend, set NEXT_PUBLIC_BASE_PATH based on environment |
58 | | - if [ "${TEAM}" = "frontend" ]; then |
| 57 | + if [ "${REPO_NAME}" = "frontend" ]; then |
59 | 58 | if [ "${ENV_TAG}" = "dev" ]; then |
60 | 59 | BUILD_ARGS="--build-arg NEXT_PUBLIC_BASE_PATH=/frontend/dev" |
61 | 60 | elif [ "${ENV_TAG}" = "prod" ]; then |
|
98 | 97 | docker push ${DOCKER_USER}/${REPO_NAME,,}:${COMMIT_TAG}-${ENV_TAG} > /dev/null 2>&1 |
99 | 98 | docker push ${DOCKER_USER}/${REPO_NAME,,}:${MOVING_TAG} > /dev/null 2>&1 |
100 | 99 |
|
101 | | - echo "${TEAM} Docker build completed successfully!" |
| 100 | + echo "${REPO_NAME} Docker build completed successfully!" |
102 | 101 | echo "Image: ${DOCKER_USER}/${REPO_NAME,,}:${COMMIT_TAG}-${ENV_TAG}" |
103 | 102 | fi |
0 commit comments