Skip to content

Commit bbc4e7b

Browse files
authored
Merge pull request #162 from umc-commit/bkw535-patch-1
[BUG] update cd.yml
2 parents d2ba2b0 + 165a8db commit bbc4e7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/commit-api:latest
4141
4242
echo "🔍 Checking current active environment..."
43-
ACTIVE_COLOR=$(docker exec nginx-proxy grep -Po '(?<=proxy_pass http://)node-app-(blue|green)' /etc/nginx/conf.d/default.conf | cut -d'-' -f3)
43+
ACTIVE_COLOR=$(docker exec nginx-proxy sh -c "grep -oP 'node-app-(blue|green)' /etc/nginx/conf.d/default.conf | head -1 | cut -d'-' -f3")
4444
4545
if [ "$ACTIVE_COLOR" = "blue" ]; then
4646
TARGET_COLOR=green

0 commit comments

Comments
 (0)