@@ -19,14 +19,24 @@ jobs:
19
19
- name : Checkout
20
20
uses : actions/checkout@v2
21
21
22
- - name : Docker meta
23
- id : meta
22
+ - name : Docker app meta
23
+ id : meta-app
24
24
uses : docker/metadata-action@v3
25
25
with :
26
26
images : 933237757710.dkr.ecr.eu-west-1.amazonaws.com/app
27
27
28
+ - name : Docker reverseproxy meta
29
+ id : meta-reverseproxy
30
+ uses : docker/metadata-action@v3
31
+ with :
32
+ images : 933237757710.dkr.ecr.eu-west-1.amazonaws.com/nginx
33
+
34
+ - name : Set up Docker Buildx
35
+ id : build-app
36
+ uses : docker/setup-buildx-action@v1
37
+
28
38
- name : Set up Docker Buildx
29
- id : buildx
39
+ id : build-reverseproxy
30
40
uses : docker/setup-buildx-action@v1
31
41
32
42
- name : Cache Docker layers
@@ -50,13 +60,26 @@ jobs:
50
60
if : github.event_name != 'pull_request'
51
61
uses : aws-actions/amazon-ecr-login@v1
52
62
53
- - name : Build and push
54
- id : docker_build
63
+ - name : Build and push app
64
+ id : docker_build_app
55
65
uses : docker/build-push-action@v2
56
66
with :
57
67
context : .
68
+ builder : ${{ steps.build-app.outputs.name }}
69
+ push : ${{ github.event_name != 'pull_request' }}
70
+ tags : ${{ steps.meta-app.outputs.tags }}
71
+ labels : ${{ steps.meta-app.outputs.labels }}
72
+ cache-from : type=local,src=/tmp/.buildx-cache
73
+ cache-to : type=local,dest=/tmp/.buildx-cache
74
+
75
+ - name : Build and push reverseproxy
76
+ id : docker_build_reverseproxy
77
+ uses : docker/build-push-action@v2
78
+ with :
79
+ context : ./reverseproxy
80
+ builder : ${{ steps.build-reverseproxy.outputs.name }}
58
81
push : ${{ github.event_name != 'pull_request' }}
59
- tags : ${{ steps.meta.outputs.tags }}
60
- labels : ${{ steps.meta.outputs.labels }}
82
+ tags : ${{ steps.meta-reverseproxy .outputs.tags }}
83
+ labels : ${{ steps.meta-reverseproxy .outputs.labels }}
61
84
cache-from : type=local,src=/tmp/.buildx-cache
62
85
cache-to : type=local,dest=/tmp/.buildx-cache
0 commit comments