Skip to content

Commit 312119c

Browse files
committed
switch to docker compose build action
1 parent 9f26f63 commit 312119c

File tree

2 files changed

+15
-65
lines changed

2 files changed

+15
-65
lines changed

.github/workflows/docker-build-local.yml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,41 +25,20 @@ jobs:
2525
- name: Pull MongoDB
2626
run: docker pull mongo:4.4.15
2727

28-
- name: Build API
29-
uses: docker/build-push-action@v5
28+
- name: Build services
29+
uses: docker/compose-action@v3
3030
with:
31-
context: .
32-
file: ${{ env.COMPOSE_FILE }}
33-
target: api
34-
load: true
35-
tags: ezbids-api:test
36-
37-
- name: Build Handler
38-
uses: docker/build-push-action@v5
39-
with:
40-
context: .
41-
file: ${{ env.COMPOSE_FILE }}
42-
target: handler
43-
load: true
44-
tags: ezbids-handler:test
45-
46-
- name: Build UI
47-
uses: docker/build-push-action@v5
48-
with:
49-
context: .
50-
file: ${{ env.COMPOSE_FILE }}
51-
target: ui
52-
load: true
53-
tags: ezbids-ui:test
31+
compose-file: ${{ env.COMPOSE_FILE }}
32+
build: true
5433

5534
- name: Save images
5635
id: save-images
5736
run: |
5837
# Save images to tar files
5938
docker save mongo:4.4.15 > mongo.tar
60-
docker save ezbids-api:test > api.tar
61-
docker save ezbids-handler:test > handler.tar
62-
docker save ezbids-ui:test > ui.tar
39+
docker save ezbids_docker-api:latest > api.tar
40+
docker save ezbids_docker-handler:latest > handler.tar
41+
docker save ezbids_docker-ui:latest > ui.tar
6342
6443
# Upload as artifacts
6544
echo "images=mongo.tar,api.tar,handler.tar,ui.tar" >> $GITHUB_OUTPUT

.github/workflows/docker-build-nginx.yml

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -25,50 +25,21 @@ jobs:
2525
- name: Pull MongoDB
2626
run: docker pull mongo:4.4.15
2727

28-
- name: Build API
29-
uses: docker/build-push-action@v5
28+
- name: Build services
29+
uses: docker/compose-action@v3
3030
with:
31-
context: .
32-
file: ${{ env.COMPOSE_FILE }}
33-
target: api
34-
load: true
35-
tags: ezbids-api-nginx:test
36-
37-
- name: Build Handler
38-
uses: docker/build-push-action@v5
39-
with:
40-
context: .
41-
file: ${{ env.COMPOSE_FILE }}
42-
target: handler
43-
load: true
44-
tags: ezbids-handler-nginx:test
45-
46-
- name: Build UI
47-
uses: docker/build-push-action@v5
48-
with:
49-
context: ./ui
50-
file: ./ui/Dockerfile-nginx
51-
load: true
52-
tags: ezbids-ui-nginx:test
53-
54-
- name: Build Nginx
55-
uses: docker/build-push-action@v5
56-
with:
57-
context: .
58-
file: ${{ env.COMPOSE_FILE }}
59-
target: nginx
60-
load: true
61-
tags: ezbids-nginx:test
31+
compose-file: ${{ env.COMPOSE_FILE }}
32+
build: true
6233

6334
- name: Save images
6435
id: save-images
6536
run: |
6637
# Save images to tar files
6738
docker save mongo:4.4.15 > mongo.tar
68-
docker save ezbids-api-nginx:test > api-nginx.tar
69-
docker save ezbids-handler-nginx:test > handler-nginx.tar
70-
docker save ezbids-ui-nginx:test > ui-nginx.tar
71-
docker save ezbids-nginx:test > nginx.tar
39+
docker save ezbids_docker-api:latest > api-nginx.tar
40+
docker save ezbids_docker-handler:latest > handler-nginx.tar
41+
docker save ezbids_docker-ui:latest > ui-nginx.tar
42+
docker save ezbids_docker-nginx:latest > nginx.tar
7243
7344
# Upload as artifacts
7445
echo "images=mongo.tar,api-nginx.tar,handler-nginx.tar,ui-nginx.tar,nginx.tar" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)