-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (53 loc) · 1.69 KB
/
itkdev_docker_build_develop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
on:
push:
branches:
- 'develop'
# This Action builds to itkdev/* using ./infrastructure/itkdev/*
name: ITK Dev - Build docker image (develop)
jobs:
docker:
runs-on: ubuntu-latest
env:
APP_VERSION: develop
COMPOSER_ALLOW_SUPERUSER: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build api
- name: Docker meta (API)
id: meta-api
uses: docker/metadata-action@v5
with:
images: itkdev/os2display-api-service
- name: Build and push (API)
uses: docker/build-push-action@v5
with:
context: ./infrastructure/itkdev/display-api-service/
file: ./infrastructure/itkdev/display-api-service/Dockerfile
build-args: |
VERSION=${{ env.APP_VERSION }}
push: true
tags: ${{ steps.meta-api.outputs.tags }}
labels: ${{ steps.meta-api.outputs.labels }}
# Build nginx (depends on api build)
- name: Docker meta (Nginx)
id: meta-nginx
uses: docker/metadata-action@v5
with:
images: itkdev/os2display-api-service-nginx
- name: Build and push (Nginx)
uses: docker/build-push-action@v5
with:
context: ./infrastructure/itkdev/nginx/
file: ./infrastructure/itkdev/nginx/Dockerfile
build-args: |
APP_VERSION=${{ env.APP_VERSION }}
push: true
tags: ${{ steps.meta-nginx.outputs.tags }}
labels: ${{ steps.meta-nginx.outputs.labels }}