Update: Mensagem de commit dinâmica configurada
This commit is contained in:
+4
-1
@@ -1,6 +1,8 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
import sys
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
# Configurações do Gitea
|
# Configurações do Gitea
|
||||||
GITEA_USER = "admtracksteel"
|
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")
|
run_command(f'git remote add origin {remote_url}', "adicionar novo remote")
|
||||||
|
|
||||||
# Add e Commit
|
# 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 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
|
# Push final
|
||||||
run_command("git push -u origin main --force", "fazer push para o Gitea")
|
run_command("git push -u origin main --force", "fazer push para o Gitea")
|
||||||
|
|||||||
@@ -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)
|
# 1. Sincronização com Repositório (usando o script python existente)
|
||||||
echo -e "${YELLOW}📝 Sincronizando código com o Gitea...${NC}"
|
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)
|
# 2. Gatilho de Deploy no Coolify (API Oficial v1)
|
||||||
COOLIFY_RESOURCE_UUID="ndvuaekrq3jhr562mm1uld5a"
|
COOLIFY_RESOURCE_UUID="ndvuaekrq3jhr562mm1uld5a"
|
||||||
|
|||||||
Reference in New Issue
Block a user