-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (67 loc) · 1.9 KB
/
test-images.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
74
75
76
name: Build and Push Test Images
on:
workflow_dispatch:
workflow_call:
push:
branches:
- main
paths:
- "assets/model-**"
pull_request:
branches:
- main
paths:
- "assets/model-**"
jobs:
build-push-test-image:
runs-on: ubuntu-latest
strategy:
matrix:
model:
[
"dummy-cls",
"dummy-det",
# "dummy-image-to-image",
"dummy-instance-segmentation",
"dummy-keypoint",
"dummy-semantic-segmentation",
"dummy-completion",
"dummy-chat",
"dummy-text-to-image",
"dummy-multimodal-chat",
"dummy-text-embedding",
]
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.botGitHubToken }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Instill Python SDK
run: pip install --pre instill-sdk
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: builder
with:
driver-opts: image=moby/buildkit:master
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: dropletbot
password: ${{ secrets.botDockerHubPassword }}
- name: Determine Docker tag
id: tag
run: |
if [ "${{ github.ref_name }}" == "main" ]; then
echo "tag=latest" >> $GITHUB_ENV
else
echo "tag=dev" >> $GITHUB_ENV
fi
- name: Build test models
working-directory: ./assets/model-${{ matrix.model }}
run: instill build instill/${{ matrix.model }} -t ${{ env.tag }}
- name: Push test models
working-directory: ./assets/model-${{ matrix.model }}
run: instill push instill/${{ matrix.model }} -t ${{ env.tag }} -u docker.io