Skip to content

Commit e0453dd

Browse files
committed
Fix deploy to get env variables into context
1 parent e3691b9 commit e0453dd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ jobs:
155155
156156
sudo docker pull "ghcr.io/${REPO}:${IMAGE_TAG}"
157157
158-
# Deploy/update stack
159-
sudo env IMAGE="ghcr.io/${REPO}" IMAGE_TAG="$IMAGE_TAG" \
158+
# Deploy/update stack — export .env vars for compose interpolation
159+
# (docker stack deploy does NOT read .env files automatically)
160+
sudo env $(grep -v '^#' .env | grep -v '^$' | xargs) \
161+
IMAGE="ghcr.io/${REPO}" IMAGE_TAG="$IMAGE_TAG" \
160162
docker stack deploy -c docker-compose.yml \
161163
--with-registry-auth --resolve-image always --prune "${STACK_NAME}"
162164

0 commit comments

Comments
 (0)