- Add wmill.yaml configuration with includes for f/**, u/**, g/** - Add sync_to_git.sh script for automatic Git synchronization - Add initial workflows synced from Windmill: - Test script: u/antigravity/test_git_sync - Admin scripts: u/admin/hub_sync - Setup app: g/all/setup_app - Folders: f/app_custom, f/app_groups, f/app_themes
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Windmill Workflow Git Auto-Sync Script
|
|
# このスクリプトは、Windmillワークフローを自動的にGitにコミットします
|
|
|
|
set -e
|
|
|
|
# 色付き出力
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${GREEN}=== Windmill Workflow Git Sync ===${NC}"
|
|
|
|
# ディレクトリに移動
|
|
cd /home/akira/develop/windmill/workflows
|
|
|
|
# PATHを設定
|
|
export PATH=~/.npm-global/bin:$PATH
|
|
|
|
# Windmillから最新を取得
|
|
echo -e "${YELLOW}Pulling from Windmill...${NC}"
|
|
wmill sync pull --skip-variables --skip-secrets --skip-resources --yes
|
|
|
|
# 変更があるか確認
|
|
if [[ -n $(git status --porcelain) ]]; then
|
|
echo -e "${YELLOW}Changes detected, committing to Git...${NC}"
|
|
|
|
# 変更をステージング
|
|
git add -A
|
|
|
|
# コミット
|
|
TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')
|
|
git commit -m "Auto-sync: ${TIMESTAMP}
|
|
|
|
Synced workflows from Windmill workspace"
|
|
|
|
echo -e "${GREEN}✓ Changes committed to Git${NC}"
|
|
else
|
|
echo -e "${GREEN}✓ No changes detected${NC}"
|
|
fi
|
|
|
|
echo -e "${GREEN}=== Sync Complete ===${NC}"
|