Aggiornamento staging #1
@@ -101,19 +101,47 @@ jobs:
|
||||
steps:
|
||||
- name: Download and extract repository
|
||||
run: |
|
||||
echo Downloading repository from GitHub...
|
||||
echo ===== Downloading repository =====
|
||||
curl -L -o repo.zip https://github.com/${{ github.repository }}/archive/refs/heads/${{ github.ref_name }}.zip
|
||||
echo Extracting archive...
|
||||
tar -xf repo.zip
|
||||
echo Moving files...
|
||||
for /d %%d in (*) do (
|
||||
if exist "%%d\.gitignore" (
|
||||
xcopy "%%d\*" . /E /H /Y /Q
|
||||
rmdir "%%d" /S /Q
|
||||
)
|
||||
if errorlevel 1 (
|
||||
echo Failed to download repository
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo ===== Extracting archive =====
|
||||
tar -xf repo.zip
|
||||
if errorlevel 1 (
|
||||
echo Failed to extract archive
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo ===== Finding extracted folder =====
|
||||
dir /B /AD
|
||||
|
||||
echo ===== Moving files to current directory =====
|
||||
REM GitHub creates folder with format: repo-name-branch
|
||||
REM Find first directory and copy its contents
|
||||
for /d %%i in (*) do (
|
||||
echo Found directory: %%i
|
||||
echo Copying contents from %%i to current directory...
|
||||
robocopy "%%i" . /E /MOVE /NFL /NDL /NJH /NJS
|
||||
goto :extracted
|
||||
)
|
||||
:extracted
|
||||
|
||||
echo ===== Cleaning up =====
|
||||
del repo.zip
|
||||
echo Repository ready
|
||||
|
||||
echo ===== Verifying files =====
|
||||
echo Current directory contents:
|
||||
dir /B
|
||||
|
||||
if exist Dockerfile.windows (
|
||||
echo SUCCESS: Dockerfile.windows found!
|
||||
) else (
|
||||
echo ERROR: Dockerfile.windows not found!
|
||||
exit /b 1
|
||||
)
|
||||
shell: cmd
|
||||
|
||||
- name: Debug - Verify files
|
||||
|
||||
Reference in New Issue
Block a user