Fixed drone.yml
This commit is contained in:
64
PUSH_DOCKER.bat
Normal file
64
PUSH_DOCKER.bat
Normal file
@@ -0,0 +1,64 @@
|
||||
@echo off
|
||||
echo ========================================
|
||||
echo MC Panel - Push Docker Image
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Проверка Docker
|
||||
docker --version >nul 2>&1
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo [ERROR] Docker is not installed or not running!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [INFO] Pushing Docker images to registry...
|
||||
echo [INFO] Registry: registry.nevetime.ru
|
||||
echo.
|
||||
|
||||
REM Получить короткий хеш коммита
|
||||
git rev-parse --short HEAD >nul 2>&1
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
for /f %%i in ('git rev-parse --short HEAD') do set GIT_HASH=%%i
|
||||
) else (
|
||||
set GIT_HASH=local
|
||||
)
|
||||
|
||||
echo [STEP 1/3] Pushing latest tag...
|
||||
docker push registry.nevetime.ru/mc-panel:latest
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo [ERROR] Failed to push latest tag!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [STEP 2/3] Pushing git hash tag...
|
||||
docker push registry.nevetime.ru/mc-panel:%GIT_HASH%
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo [ERROR] Failed to push git hash tag!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [STEP 3/3] Pushing version tag...
|
||||
docker push registry.nevetime.ru/mc-panel:1.1.0
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo [ERROR] Failed to push version tag!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo [SUCCESS] All images pushed successfully!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Pushed tags:
|
||||
echo - registry.nevetime.ru/mc-panel:latest
|
||||
echo - registry.nevetime.ru/mc-panel:%GIT_HASH%
|
||||
echo - registry.nevetime.ru/mc-panel:1.1.0
|
||||
echo.
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user