Update pipeline & dockerfile
All checks were successful
Build and Publish / build (push) Successful in 11s
All checks were successful
Build and Publish / build (push) Successful in 11s
This commit is contained in:
@@ -19,7 +19,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker build --target artifacts --output type=local,dest=./out .
|
docker build --target artifacts --output type=local,dest=./out .
|
||||||
ls -la ./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
|
- name: Build immagine Docker
|
||||||
run: |
|
run: |
|
||||||
IMAGE_NAME="${{ vars.REGISTRY_URL }}/${{ github.repository }}"
|
IMAGE_NAME="${{ vars.REGISTRY_URL }}/${{ github.repository }}"
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ RUN npm install
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Artifacts stage (per estrarre i build artifacts)
|
# Artifacts stage - esporta SOLO dist
|
||||||
FROM build AS artifacts
|
FROM scratch AS artifacts
|
||||||
RUN mkdir -p /out/dist && cp -r dist/* /out/dist/
|
COPY --from=build /app/dist /dist
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM node:18-alpine AS production
|
FROM node:18-alpine AS production
|
||||||
|
|||||||
Reference in New Issue
Block a user