Aggiornamento staging #1
@@ -99,47 +99,25 @@ jobs:
|
|||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download and extract repository
|
- name: Checkout repository with Git
|
||||||
run: |
|
run: |
|
||||||
echo ===== Downloading repository =====
|
echo ===== Cloning repository =====
|
||||||
curl -L -o repo.zip https://github.com/${{ github.repository }}/archive/refs/heads/${{ github.ref_name }}.zip
|
git clone --depth 1 --branch ${{ github.ref_name }} https://github.com/${{ github.repository }}.git repo
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
echo Failed to download repository
|
echo Failed to clone repository
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
echo ===== Extracting archive =====
|
echo ===== Moving files to working directory =====
|
||||||
tar -xf repo.zip
|
robocopy repo . /E /MOVE /NFL /NDL /NJH /NJS
|
||||||
if errorlevel 1 (
|
rmdir repo /S /Q 2>nul
|
||||||
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 ===== Verifying files =====
|
|
||||||
echo Current directory contents:
|
|
||||||
dir /B
|
|
||||||
|
|
||||||
|
echo ===== Verifying checkout =====
|
||||||
if exist Dockerfile.windows (
|
if exist Dockerfile.windows (
|
||||||
echo SUCCESS: Dockerfile.windows found!
|
echo SUCCESS: Repository checked out, Dockerfile.windows found
|
||||||
) else (
|
) else (
|
||||||
echo ERROR: Dockerfile.windows not found!
|
echo ERROR: Dockerfile.windows not found
|
||||||
|
dir /B
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|||||||
Reference in New Issue
Block a user