Update pipeline & dockerfile
All checks were successful
Build and Publish / build (push) Successful in 11s

This commit is contained in:
2025-12-31 17:47:47 +01:00
parent 5baa58347b
commit 54eead09a4
2 changed files with 4 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ jobs:
run: |
docker build --target artifacts --output type=local,dest=./out .
ls -la ./out/
tar -czf build-artifact.tar.gz -C ./out/dist .
tar -czf build-artifact.tar.gz -C ./out .
- name: Build immagine Docker
run: |
IMAGE_NAME="${{ vars.REGISTRY_URL }}/${{ github.repository }}"

View File

@@ -6,9 +6,9 @@ RUN npm install
COPY . .
RUN npm run build
# Artifacts stage (per estrarre i build artifacts)
FROM build AS artifacts
RUN mkdir -p /out/dist && cp -r dist/* /out/dist/
# Artifacts stage - esporta SOLO dist
FROM scratch AS artifacts
COPY --from=build /app/dist /dist
# Production stage
FROM node:18-alpine AS production