File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,16 @@ echo "::notice::using ${KUBERNETES_POD_EXISTING_IMAGE}"
50
50
51
51
if [ alembic_exitcode -eq 0 ]; then
52
52
ALEMBIC_HEAD=${ALEMBIC_CURRENT_REVISION: 0: 12}
53
- echo " ::notice::downgrading to alembic revision: $ALEMBIC_HEAD "
54
- kubectl exec -i deployment/${KUBERNETES_DEPLOYMENT_NAME} -c $KUBERNETES_DEPLOYMENT_NAME -- alembic downgrade $ALEMBIC_HEAD
53
+
54
+ ALEMBIC_UPDATED_REVISION=$( kubectl exec -i deployment/${KUBERNETES_DEPLOYMENT_NAME} -c $KUBERNETES_DEPLOYMENT_NAME -- alembic current)
55
+ ALEMBIC_UPDATED_HEAD=${ALEMBIC_UPDATED_REVISION: 0: 12}
56
+
57
+ if [ $ALEMBIC_HEAD = $ALEMBIC_UPDATED_HEAD ]; then
58
+ echo " ::notice::skipping alembic downgrade"
59
+ else
60
+ echo " ::notice::downgrading to alembic revision: $ALEMBIC_HEAD "
61
+ kubectl exec -i deployment/${KUBERNETES_DEPLOYMENT_NAME} -c $KUBERNETES_DEPLOYMENT_NAME -- alembic downgrade $ALEMBIC_HEAD
62
+ fi
55
63
fi
56
64
57
65
exit $exitcode
You can’t perform that action at this time.
0 commit comments