File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
.github/actions/db-migration Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ jobs:
254254 SQL_DIR="${PWD}/database/migration"
255255 pushd kubernetes/migration
256256 kubectl -n $NAMESPACE delete configmap $MIGRATION_NAME || echo "no migration configmap existing for deletion"
257- if [ -f ${SQL_DIR}/*.sql ] ; then
257+ if [ `ls ${SQL_DIR}/*.sql 2>/dev/null | wc -l` -gt 0 ] ; then
258258 kubectl -n $NAMESPACE create configmap $MIGRATION_NAME --from-file ${SQL_DIR}/*.sql
259259 else
260260 kubectl -n $NAMESPACE create configmap $MIGRATION_NAME
Original file line number Diff line number Diff line change 2020 kubectl -n $NAMESPACE delete configmap $MIGRATION_NAME || echo "no migration configmap existing for deletion"
2121 kubectl -n $NAMESPACE delete job $MIGRATION_NAME || echo "no migration job existing for deletion"
2222
23- if [ -f ${SQL_DIR}/*.sql ] ; then
23+ if [ `ls ${SQL_DIR}/*.sql 2>/dev/null | wc -l` -gt 0 ] ; then
2424 pushd kubernetes/migration
2525 kubectl -n $NAMESPACE delete configmap $MIGRATION_NAME || echo "no migration configmap existing for deletion"
2626 kubectl -n $NAMESPACE create configmap $MIGRATION_NAME --from-file ${SQL_DIR}/*.sql
You can’t perform that action at this time.
0 commit comments