[Fix] Semplificato checkout: clone in cartella source e cd, eliminato robocopy
Build and Push Docker Images / Build Windows Container (push) Failing after 20s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Linux Container (push) Has been cancelled

This commit is contained in:
2026-01-24 17:29:53 +01:00
parent 7fe8453e7a
commit d8a2069640
+5 -22
View File
@@ -101,30 +101,13 @@ jobs:
steps:
- name: Checkout repository with Git
run: |
echo ===== Cloning repository from Gitea =====
git clone --depth 1 --branch ${{ github.ref_name }} https://alessio:%REGISTRY_TOKEN%@gitea.home-nas-ds.org/${{ github.repository }}.git repo
if errorlevel 1 (
echo Failed to clone repository
exit /b 1
)
echo ===== Moving files to working directory =====
robocopy repo . /E /MOVE /NFL /NDL /NJH /NJS
REM robocopy exit codes: 0=no copy, 1=ok, 2=extra files, 3=ok+extra, 4+=error
if %ERRORLEVEL% GEQ 8 (
echo Robocopy failed with exit code %ERRORLEVEL%
exit /b 1
)
rmdir repo /S /Q 2>nul
echo ===== Verifying checkout =====
if exist Dockerfile.windows (
echo SUCCESS: Repository checked out, Dockerfile.windows found
) else (
git clone --depth 1 --branch ${{ github.ref_name }} https://alessio:%REGISTRY_TOKEN%@gitea.home-nas-ds.org/${{ github.repository }}.git source
cd source
if not exist Dockerfile.windows (
echo ERROR: Dockerfile.windows not found
dir /B
exit /b 1
)
echo SUCCESS: Repository cloned
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
shell: cmd
@@ -174,8 +157,8 @@ jobs:
if "%BRANCH%"=="staging" (
set TAGS=%IMAGE_LOWER%:staging-latest-windows
set TAGS=%TAGS% %IMAGE_LOWER%:staging-windows-%SHORT_SHA%
)
cd source
echo Building Windows Docker image...
docker build -t temp-windows -f Dockerfile.windows .
if errorlevel 1 (