@@ -45,65 +45,50 @@ jobs:
45
45
id : set-matrix
46
46
run : |
47
47
matrix=()
48
- if [[ "${{ steps.filter.outputs.user }}" == "true" || "${{ contains(github.ref, 'main') }}" == "true" ]]; then
49
- config=$(cat <<EOF
50
- {
51
- "package": "user",
52
- "image": "$DOCKER_REGISTRY_USN/user-express",
53
- "context": "./backend/user",
54
- "dockerfile": "./backend/user/express.Dockerfile",
55
- "build-args": "port=$USER_EXPRESS_PORT"
56
- }
57
- EOF)
58
- matrix+=("$config")
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\"
55
+ }")
59
56
fi
60
- if [[ "${{ steps.filter.outputs.question }}" == "true" || "${{ contains(github.ref, 'main') }}" == "true" ]]; then
61
- config=$(cat <<EOF
62
- {
63
- "package": "question",
64
- "image": "$DOCKER_REGISTRY_USN/question-express",
65
- "context": "./backend/question",
66
- "dockerfile": "./backend/question/express.Dockerfile",
67
- "build-args": "port=$QUESTION_EXPRESS_PORT"
68
- }
69
- EOF)
70
- matrix+=("$config")
57
+ 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\"
64
+ }")
71
65
fi
72
- if [[ "${{ steps.filter.outputs.collaboration }}" == "true" || "${{ contains(github.ref, 'main') }}" == "true" ]]; then
73
- config=$(cat <<EOF
74
- {
75
- "package": "collaboration",
76
- "image": "$DOCKER_REGISTRY_USN/collab-express",
77
- "context": "./backend/collaboration",
78
- "dockerfile": "./backend/collaboration/express.Dockerfile",
79
- "build-args": "port=$COLLAB_EXPRESS_PORT"
80
- }
81
- EOF)
82
- matrix+=("$config")
66
+ 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\"
73
+ }")
83
74
fi
84
- if [[ "${{ steps.filter.outputs.matching }}" == "true" || "${{ contains(github.ref, 'main') }}" == "true" ]]; then
85
- config=$(cat <<EOF
86
- {
87
- "package": "matching",
88
- "image": "$DOCKER_REGISTRY_USN/match-express",
89
- "context": "./backend/matching",
90
- "dockerfile": "./backend/matching/express.Dockerfile",
91
- "build-args": "port=$MATCH_EXPRESS_PORT"
92
- }
93
- EOF)
94
- matrix+=("$config")
75
+ 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\"
82
+ }")
95
83
fi
96
- if [[ "${{ steps.filter.outputs.frontend }}" == "true" || "${{ contains(github.ref, 'main') }}" == "true" ]]; then
97
- config=$(cat <<EOF
98
- {
99
- "package": "frontend",
100
- "image": "$DOCKER_REGISTRY_USN/frontend",
101
- "context": "./frontend",
102
- "dockerfile": "./frontend/frontend.Dockerfile",
103
- "build-args": "port=$FRONTEND_PORT"
104
- }
105
- EOF)
106
- matrix+=("$config")
84
+ 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\"
91
+ }")
107
92
fi
108
93
formatted_matrix=$(echo "[${matrix[*]}]" | jq -c .)
109
94
echo "Outputs Generated: $formatted_matrix"
0 commit comments