Skip to content

Commit 165a8db

Browse files
authored
Update cd.yml
1 parent d2ba2b0 commit 165a8db

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)