Skip to content

Commit 56360f2

Browse files
Merge pull request #195 from microsoft/PSL-update-dockeryml-file
ci: Docker image yml file updated for building conditionally
2 parents 0ec2443 + 2546cc3 commit 56360f2

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/docker-build-and-push.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Build and Push Docker Image
22

33
on:
44
pull_request:
5-
types: [closed]
5+
types:
6+
- opened
7+
- ready_for_review
8+
- reopened
9+
- synchronize
610
branches:
711
- main
812
- dev
@@ -11,7 +15,6 @@ on:
1115

1216
jobs:
1317
build-and-push:
14-
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
1518
runs-on: ubuntu-latest
1619

1720
steps:
@@ -58,3 +61,4 @@ jobs:
5861
tags: |
5962
${{ steps.registry.outputs.registry }}/webapp:${{ steps.determine_tag.outputs.tagname }}
6063
${{ steps.registry.outputs.registry }}/webapp:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
64+

WebApp.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ USER node
77
RUN npm ci
88
COPY --chown=node:node ./frontend/ ./frontend
99
WORKDIR /home/node/app/frontend
10+
RUN npm install --save-dev @types/node @types/jest
1011
RUN NODE_OPTIONS=--max_old_space_size=8192 npm run build
1112

1213
FROM python:3.11-alpine
@@ -27,4 +28,4 @@ COPY --from=frontend /home/node/app/static /usr/src/app/static/
2728
WORKDIR /usr/src/app
2829
EXPOSE 80
2930

30-
CMD ["gunicorn" , "-b", "0.0.0.0:80", "app:app"]
31+
CMD ["gunicorn" , "-b", "0.0.0.0:80", "app:app"]

0 commit comments

Comments
 (0)