Fix migration check in deploy script to use reliable exit code
`docker compose wait migrate | grep -qx "0"` was unreliable because `docker compose wait` output format may not match the literal string "0". Replace with `docker compose up --no-deps migrate` (foreground, no -d), which exits with the container's actual exit code — no grep needed. https://claude.ai/code/session_01WRe4qZuV2NQqDYurpDodF4
This commit is contained in:
parent
0f97ab258f
commit
23194a590c
1 changed files with 1 additions and 2 deletions
3
.github/workflows/deploy.yml
vendored
3
.github/workflows/deploy.yml
vendored
|
|
@ -149,8 +149,7 @@ jobs:
|
||||||
docker login $CONTAINER_REGISTRY -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD
|
docker login $CONTAINER_REGISTRY -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD
|
||||||
cd brackt
|
cd brackt
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d migrate
|
if ! docker compose up --no-deps migrate; then
|
||||||
if ! docker compose wait migrate | grep -qx "0"; then
|
|
||||||
echo "Migration failed:"
|
echo "Migration failed:"
|
||||||
docker compose logs migrate
|
docker compose logs migrate
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue