-
Notifications
You must be signed in to change notification settings - Fork 792
74 lines (66 loc) · 3.63 KB
/
Release-Push-Single-Image-to-Dockerhub.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
61
62
63
64
65
66
67
68
69
70
71
72
73
name: (Release) Build and Push Single image to Production
on:
workflow_dispatch:
inputs:
version:
description: Version (e.g., 1.0.0)
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_LOGIN }}
password: ${{ secrets.DOCKER_HUB_PWD }}
- name: Build facenet images
env:
VERSION: ${{ github.event.inputs.version }}
APPERY_API_KEY: ${{ secrets.APPERY_API_KEY }}
working-directory: ./custom-builds/Single-Docker-File/
run: |
docker build -f Dockerfile --build-arg BASE_IMAGE=exadel/compreface-core:${VERSION} --build-arg VERSION=${VERSION} --build-arg APPERY_API_KEY=${APPERY_API_KEY} -t exadel/compreface:latest ./../..
docker build -f Dockerfile --build-arg BASE_IMAGE=exadel/compreface-core:${VERSION} --build-arg VERSION=${VERSION} --build-arg APPERY_API_KEY=${APPERY_API_KEY} -t exadel/compreface:${VERSION} ./../..
docker build -f Dockerfile --build-arg BASE_IMAGE=exadel/compreface-core:${VERSION}-facenet --build-arg VERSION=${VERSION} --build-arg APPERY_API_KEY=${APPERY_API_KEY} -t exadel/compreface:${VERSION}-facenet ./../..
docker images
- name: Push facenet images to Docker Hub
working-directory: ./custom-builds/Single-Docker-File/
run: |
docker push --all-tags exadel/compreface
- name: clean docker
working-directory: ./custom-builds/Single-Docker-File/
run: |
docker system prune --force
- name: Build insightface cpu images
env:
VERSION: ${{ github.event.inputs.version }}
APPERY_API_KEY: ${{ secrets.APPERY_API_KEY }}
working-directory: ./custom-builds/Single-Docker-File/
run: |
docker build -f Dockerfile --build-arg BASE_IMAGE=exadel/compreface-core:${VERSION}-mobilenet --build-arg VERSION=${VERSION} --build-arg APPERY_API_KEY=${APPERY_API_KEY} -t exadel/compreface:${VERSION}-mobilenet ./../..
docker build -f Dockerfile --build-arg BASE_IMAGE=exadel/compreface-core:${VERSION}-arcface-r100 --build-arg VERSION=${VERSION} --build-arg APPERY_API_KEY=${APPERY_API_KEY} -t exadel/compreface:${VERSION}-arcface-r100 ./../..
docker images
- name: Push insightface cpu images to Docker Hub
working-directory: ./custom-builds/Single-Docker-File/
run: |
docker push --all-tags exadel/compreface
- name: clean docker
working-directory: ./custom-builds/Single-Docker-File/
run: |
docker system prune --force
- name: Build insightface gpu images
env:
VERSION: ${{ github.event.inputs.version }}
APPERY_API_KEY: ${{ secrets.APPERY_API_KEY }}
working-directory: ./custom-builds/Single-Docker-File/
run: |
docker build -f Dockerfile --build-arg BASE_IMAGE=exadel/compreface-core:${VERSION}-mobilenet-gpu --build-arg VERSION=${VERSION} --build-arg APPERY_API_KEY=${APPERY_API_KEY} -t exadel/compreface:${VERSION}-mobilenet-gpu ./../..
docker build -f Dockerfile --build-arg BASE_IMAGE=exadel/compreface-core:${VERSION}-arcface-r100-gpu --build-arg VERSION=${VERSION} --build-arg APPERY_API_KEY=${APPERY_API_KEY} -t exadel/compreface:${VERSION}-arcface-r100-gpu ./../..
docker images
- name: Push insightface gpu images to Docker Hub
working-directory: ./custom-builds/Single-Docker-File/
run: |
docker push --all-tags exadel/compreface