[Debug] Aggiunto debug per Dockerfile.windows
- Aggiunto step per verificare working directory e files - Controllo esistenza Dockerfile.windows prima del build - Miglior error handling con exit codes - Debug: unable to find Dockerfile.windows
This commit is contained in:
@@ -99,18 +99,40 @@ jobs:
|
|||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Debug - Check working directory
|
||||||
|
run: |
|
||||||
|
echo Current directory:
|
||||||
|
cd
|
||||||
|
echo.
|
||||||
|
echo Files in current directory:
|
||||||
|
dir
|
||||||
|
echo.
|
||||||
|
echo Looking for Dockerfiles:
|
||||||
|
dir Dockerfile*
|
||||||
|
shell: cmd
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
run: echo ${{ secrets.REGISTRY_TOKEN }} | docker login ${{ env.REGISTRY }} -u alessio --password-stdin
|
run: echo ${{ secrets.REGISTRY_TOKEN }} | docker login ${{ env.REGISTRY }} -u alessio --password-stdin
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
- name: Build and push Windows Docker image
|
- name: Build and push Windows Docker image
|
||||||
run: |
|
run: |
|
||||||
|
REM Check if Dockerfile exists
|
||||||
|
if not exist Dockerfile.windows (
|
||||||
|
echo ERROR: Dockerfile.windows not found!
|
||||||
|
dir
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
set BRANCH=${{ github.ref_name }}
|
set BRANCH=${{ github.ref_name }}
|
||||||
set SHA=${{ github.sha }}
|
set SHA=${{ github.sha }}
|
||||||
set SHORT_SHA=%SHA:~0,7%
|
set SHORT_SHA=%SHA:~0,7%
|
||||||
|
|
||||||
|
echo Building Windows image...
|
||||||
REM Build image
|
REM Build image
|
||||||
docker build -t temp-image -f Dockerfile.windows .
|
docker build -t temp-image -f Dockerfile.windows .
|
||||||
|
if errorlevel 1 exit /b 1
|
||||||
|
|
||||||
REM Tag and push based on branch
|
REM Tag and push based on branch
|
||||||
if "%BRANCH%"=="main" (
|
if "%BRANCH%"=="main" (
|
||||||
|
|||||||
Reference in New Issue
Block a user