Skip to content

Commit 1bd72a6

Browse files
fix: create service json when doesnt exists
1 parent 3578d1f commit 1bd72a6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/ci_k8_base.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,14 @@ jobs:
216216
git config user.name "github-actions"
217217
git config user.email "actions@github.com"
218218
219-
# Validate source file exists
219+
# Ensure source file exists or initialize it
220+
mkdir -p "$(dirname "$FILE")"
220221
if [ ! -f "$FILE" ]; then
221-
echo "❌ Source file '$FILE' not found. Aborting."
222-
exit 1
222+
echo "⚠️ File '$FILE' not found. Initializing with empty object."
223+
echo "{}" > "$FILE"
223224
fi
224225
226+
225227
# Remove worktree if already exists (idempotency)
226228
if [ -d "../deploy-worktree" ]; then
227229
echo "🧹 Cleaning up existing worktree"

0 commit comments

Comments
 (0)