File tree 2 files changed +55
-5
lines changed
2 files changed +55
-5
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+
6
+ name : Create and publish a Docker image v2
7
+
8
+ on :
9
+ push :
10
+ branches : ['release']
11
+ workflow_dispatch :
12
+
13
+ env :
14
+ REGISTRY : ghcr.io
15
+ IMAGE_NAME : ${{ github.repository }}
16
+
17
+ jobs :
18
+ build-and-push-image :
19
+ runs-on : ubuntu-latest
20
+ permissions :
21
+ contents : read
22
+ packages : write
23
+
24
+ steps :
25
+ - name : Checkout repository
26
+ uses : actions/checkout@v2
27
+
28
+ - name : Log in to the Container registry
29
+ uses : docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
30
+ with :
31
+ registry : ${{ env.REGISTRY }}
32
+ username : ${{ github.actor }}
33
+ password : ${{ secrets.GITHUB_TOKEN }}
34
+
35
+ - name : Extract metadata (tags, labels) for Docker
36
+ id : meta
37
+ uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
38
+ with :
39
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40
+
41
+ - name : Build and push Docker image
42
+ uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
43
+ with :
44
+ context : .
45
+ push : true
46
+ tags : ${{ steps.meta.outputs.tags }}
47
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1
- FROM node:13-alpine
1
+ FROM node:13-alpine AS builder
2
2
3
3
WORKDIR /app
4
4
5
5
RUN npm install -g --unsafe-perm create-elm-app
6
6
7
- EXPOSE 3000
7
+ COPY . .
8
8
9
- ENTRYPOINT [ " /usr/local/bin/elm-app" ]
9
+ RUN /usr/local/bin/elm-app build
10
10
11
- # to compile docker run --rm -v $PWD:/app elm-compiler
12
- CMD [ "build" ]
11
+ FROM nginx
12
+
13
+ COPY --from=builder /app/build /usr/share/nginx/html/
14
+
15
+ EXPOSE 80
You can’t perform that action at this time.
0 commit comments