diff --git a/push_steelcheck.py b/push_steelcheck.py index 9153a66..563b175 100644 --- a/push_steelcheck.py +++ b/push_steelcheck.py @@ -1,6 +1,8 @@ import subprocess import os import urllib.parse +import sys +from datetime import datetime # Configurações do Gitea GITEA_USER = "admtracksteel" @@ -34,8 +36,9 @@ run_command(f'git remote remove origin', "limpar remote antigo") run_command(f'git remote add origin {remote_url}', "adicionar novo remote") # Add e Commit +commit_message = sys.argv[1] if len(sys.argv) > 1 and sys.argv[1].strip() else f"Atualização automática - {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}" run_command("git add .", "adicionar arquivos") -run_command('git commit -m "Deploy Inicial do SteelCheck com Docker Build Automatizado"', "fazer commit inicial") +run_command(f'git commit -m "{commit_message}"', "fazer commit") # Push final run_command("git push -u origin main --force", "fazer push para o Gitea") diff --git a/update.sh b/update.sh index 8c04d63..e4cbf06 100644 --- a/update.sh +++ b/update.sh @@ -13,7 +13,7 @@ echo -e "\n${CYAN}🚀 Iniciando Ciclo Automático de Deploy SteelCheck...${NC}" # 1. Sincronização com Repositório (usando o script python existente) echo -e "${YELLOW}📝 Sincronizando código com o Gitea...${NC}" -python3 /root/Apps/SteelCheck_base/push_steelcheck.py +python3 /root/Apps/SteelCheck_base/push_steelcheck.py "$1" # 2. Gatilho de Deploy no Coolify (API Oficial v1) COOLIFY_RESOURCE_UUID="ndvuaekrq3jhr562mm1uld5a"