-
Notifications
You must be signed in to change notification settings - Fork 40
70 lines (48 loc) · 2.26 KB
/
build-debug.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
name: Build Vectordb for debug
on:
push:
branches: [ "debug", "debug-*" ]
jobs:
build:
name: Build Vectordb for debug
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')"
- name: Build
env:
DOCKER_HUB_REPOSITORY: epsilla/vectordb
IMAGE_TAG: debug
SHA_TAG: ${{ github.sha }}
run: |
export IMAGE_DATE=${{ steps.date.outputs.date }}
echo "IMAGE_DATE: ${IMAGE_DATE}"
echo "SHA: ${SHA_TAG}"
export RELEASE_TAG=`cat VERSION`;
echo "RELEASE_TAG: ${RELEASE_TAG}";
wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64
chmod +x buildx-v0.11.2.linux-amd64
mkdir -p $HOME/.docker/cli-plugins
mv buildx-v0.11.2.linux-amd64 $HOME/.docker/cli-plugins/docker-buildx
docker buildx create --use
cd ./engine
docker buildx build --build-arg="RELEASE_VERSION=v${RELEASE_TAG}-${IMAGE_DATE}" \
--platform linux/amd64 \
--label "org.opencontainers.image.description"="Official Epsilla Vector Database Image" \
--label "org.opencontainers.image.documentation"="https://epsilla-inc.gitbook.io/epsilladb" \
--label "org.opencontainers.image.source"="https://github.com/epsilla-cloud/vectordb" \
--label "org.opencontainers.image.title"="Epsilla Vector Database" \
--label "org.opencontainers.image.url"="https://www.epsilla.com" \
--label "org.opencontainers.image.vendor"="Epsilla" \
--label "org.opencontainers.image.version"=${RELEASE_TAG} \
--pull \
--push \
-t ${DOCKER_HUB_REPOSITORY}:${IMAGE_TAG} .