Skip to content

Commit 51b71b1

Browse files
committed
feat/ci: Add main branch matrix
Signed-off-by: SeeuSim <[email protected]>
1 parent 8862b23 commit 51b71b1

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

.github/workflows/build-docker.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -45,49 +45,49 @@ jobs:
4545
id: set-matrix
4646
run: |
4747
matrix=()
48-
if [[ ("${{ steps.filter.outputs.user }}" == "true") || ("${{ contains(github.ref, 'main') }}" == "true") ]]; then
49-
matrix+=("{
50-
\"package\": \"user\",
51-
\"image\": \"$DOCKER_REGISTRY_USN/user-express\",
52-
\"context\": \"./backend/user\",
53-
\"dockerfile\": \"./backend/user/express.Dockerfile\",
54-
\"build-args\": \"port=$USER_EXPRESS_PORT\"
48+
if [[ "${{ steps.filter.outputs.user }}" == "true" || "${{ contains(github.ref, 'main') }}" == "true" ]]; then
49+
matrix+=("{ \
50+
\"package\": \"user\", \
51+
\"image\": \"$DOCKER_REGISTRY_USN/user-express\", \
52+
\"context\": \"./backend/user\", \
53+
\"dockerfile\": \"./backend/user/express.Dockerfile\", \
54+
\"build-args\": \"port=$USER_EXPRESS_PORT\" \
5555
}")
5656
fi
5757
if [[ ("${{ steps.filter.outputs.question }}" == "true") || ("${{ contains(github.ref, 'main') }}" == "true") ]]; then
58-
matrix+=("{
59-
\"package\": \"question\",
60-
\"image\": \"$DOCKER_REGISTRY_USN/question-express\",
61-
\"context\": \"./backend/question\",
62-
\"dockerfile\": \"./backend/question/express.Dockerfile\",
63-
\"build-args\": \"port=$QUESTION_EXPRESS_PORT\"
58+
matrix+=("{ \
59+
\"package\": \"question\", \
60+
\"image\": \"$DOCKER_REGISTRY_USN/question-express\", \
61+
\"context\": \"./backend/question\", \
62+
\"dockerfile\": \"./backend/question/express.Dockerfile\", \
63+
\"build-args\": \"port=$QUESTION_EXPRESS_PORT\" \
6464
}")
6565
fi
6666
if [[ ("${{ steps.filter.outputs.collaboration }}" == "true") || ("${{ contains(github.ref, 'main') }}" == "true") ]]; then
67-
matrix+=("{
68-
\"package\": \"collaboration\",
69-
\"image\": \"$DOCKER_REGISTRY_USN/collab-express\",
70-
\"context\": \"./backend/collaboration\",
71-
\"dockerfile\": \"./backend/collaboration/express.Dockerfile\",
72-
\"build-args\": \"port=$COLLAB_EXPRESS_PORT\"
67+
matrix+=("{ \
68+
\"package\": \"collaboration\", \
69+
\"image\": \"$DOCKER_REGISTRY_USN/collab-express\", \
70+
\"context\": \"./backend/collaboration\", \
71+
\"dockerfile\": \"./backend/collaboration/express.Dockerfile\", \
72+
\"build-args\": \"port=$COLLAB_EXPRESS_PORT\" \
7373
}")
7474
fi
7575
if [[ ("${{ steps.filter.outputs.matching }}" == "true") || ("${{ contains(github.ref, 'main') }}" == "true") ]]; then
76-
matrix+=("{
77-
\"package\": \"matching\",
78-
\"image\": \"$DOCKER_REGISTRY_USN/match-express\",
79-
\"context\": \"./backend/matching\",
80-
\"dockerfile\": \"./backend/matching/express.Dockerfile\",
81-
\"build-args\": \"port=$MATCH_EXPRESS_PORT\"
76+
matrix+=("{ \
77+
\"package\": \"matching\", \
78+
\"image\": \"$DOCKER_REGISTRY_USN/match-express\", \
79+
\"context\": \"./backend/matching\", \
80+
\"dockerfile\": \"./backend/matching/express.Dockerfile\", \
81+
\"build-args\": \"port=$MATCH_EXPRESS_PORT\" \
8282
}")
8383
fi
8484
if [[ ("${{ steps.filter.outputs.frontend }}" == "true") || ("${{ contains(github.ref, 'main') }}" == "true") ]]; then
85-
matrix+=("{
86-
\"package\": \"frontend\",
87-
\"image\": \"$DOCKER_REGISTRY_USN/frontend\",
88-
\"context\": \"./frontend\",
89-
\"dockerfile\": \"./frontend/frontend.Dockerfile\",
90-
\"build-args\": \"port=$FRONTEND_PORT\"
85+
matrix+=("{ \
86+
\"package\": \"frontend\", \
87+
\"image\": \"$DOCKER_REGISTRY_USN/frontend\", \
88+
\"context\": \"./frontend\", \
89+
\"dockerfile\": \"./frontend/frontend.Dockerfile\", \
90+
\"build-args\": \"port=$FRONTEND_PORT\" \
9191
}")
9292
fi
9393
formatted_matrix=$(echo "[${matrix[*]}]" | jq -c .)

0 commit comments

Comments
 (0)