-
Notifications
You must be signed in to change notification settings - Fork 26
77 lines (66 loc) · 2.2 KB
/
release.yml
File metadata and controls
77 lines (66 loc) · 2.2 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release vllm-proxy
on:
push:
tags:
- 'v*'
permissions:
attestations: write
id-token: write
contents: write
packages: write
jobs:
build_and_push_image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: vllm-proxy
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Free up disk space
run: |
echo "Initial free space:"
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo "Free space after cleanup:"
df -h
working-directory: .
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Clean up Docker resources
run: |
docker system df
docker system prune -a -f
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: vllm-proxy
file: vllm-proxy/docker/Dockerfile
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/vllm-proxy:${{ github.ref_name }}
platforms: linux/amd64
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: "docker.io/${{ vars.DOCKERHUB_USERNAME }}/vllm-proxy"
subject-digest: ${{ steps.build-and-push.outputs.digest }}
push-to-registry: true
env:
DOCKER_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
with:
body: |
## Docker Image Digest (SHA256)
| Image | Digest | Verification |
|---|---|---|
| `docker.io/${{ vars.DOCKERHUB_USERNAME }}/vllm-proxy:${{ github.ref_name }}` | `${{ steps.build-and-push.outputs.digest }}` | [Verify on Sigstore](https://search.sigstore.dev/?hash=${{ steps.build-and-push.outputs.digest }})