We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d2ba2b0 + 165a8db commit bbc4e7bCopy full SHA for bbc4e7b
.github/workflows/cd.yml
@@ -40,7 +40,7 @@ jobs:
40
docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/commit-api:latest
41
42
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)
+ 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")
44
45
if [ "$ACTIVE_COLOR" = "blue" ]; then
46
TARGET_COLOR=green
0 commit comments