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