-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (53 loc) · 1.47 KB
/
main.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
name: CI
on:
push:
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: 'false'
- uses: actions/setup-python@v2.2.2
with:
python-version: '3.9'
- name: Install
id: install
run: |
python -m venv ./.venv
source .venv/bin/activate
pip3 install -r requirements.txt
- name: Download Model
id: download
run: |
source .venv/bin/activate
cd model
gdown https://drive.google.com/uc?id=17vISNEucGkSyZSfWfu5eOrBtut2wXRJ6
cd ..
docker:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [ test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: 'false'
#- run: git lfs pull
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: www.ebl.lmu.de
username: ${{ secrets.EBL_REGISTRY_USERNAME }}
password: ${{ secrets.EBL_REGISTRY_PASSWORD }}
- id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
www.ebl.lmu.de/ebl-ai-api:main
${{format('www.ebl.lmu.de/ebl-ai-api:main.{0}', github.run_number)}}