-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.14 KB
/
serving.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
name: Build serving
on:
release:
types: [created]
workflow_dispatch:
# Environment variables available to all jobs and steps in this workflow.
env:
REGION_ID: cn-beijing
REGISTRY: registry.cn-beijing.aliyuncs.com
NAMESPACE: oneflow
jobs:
build-serving:
name: "Build Serving"
runs-on: ubuntu-latest
environment: production
defaults:
run:
working-directory: serving
env:
IMAGE: triton-devel
TRITON_CONTAINER_VERSION: "21.10"
steps:
- name: Checkout
uses: actions/checkout@v2
# 1.1 Login to ACR
- name: Login to ACR with the AccessKey pair
uses: aliyun/acr-login@v1
with:
login-server: https://registry.${{ env.REGION_ID }}.aliyuncs.com
username: "${{ secrets.ACR_USERNAME }}"
password: "${{ secrets.ACR_PASSWORD }}"
# 1.2 Buid and push image to ACR
- name: Build image
run: |
docker build --tag "$REGISTRY/$NAMESPACE/$IMAGE" --build-arg TRITON_CONTAINER_VERSION=${{ env.TRITON_CONTAINER_VERSION }} .
- name: Push image to ACR
run: |
docker push "$REGISTRY/$NAMESPACE/$IMAGE"