-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (54 loc) · 1.61 KB
/
docker.yml
File metadata and controls
61 lines (54 loc) · 1.61 KB
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
name: docker
on:
release:
types: [published]
push:
branches:
- main
paths:
- Dockerfile
- .github/workflows/docker.yml
- uv.lock
pull_request:
branches:
- main
paths:
- Dockerfile
- .github/workflows/docker.yml
- uv.lock
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on:
- self-hosted
- docker
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.0
- name: Extract vLLM version
id: vllm-version
run: |
VERSION=$(grep -A 1 'name = "vllm"' uv.lock | grep version | cut -d '"' -f 2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893
with:
images: vectorinstitute/vector-inference
- name: Build and push Docker image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ steps.meta.outputs.tags }}
vectorinstitute/vector-inference:${{ steps.vllm-version.outputs.version }}
labels: ${{ steps.meta.outputs.labels }}