Skip to content

Commit 0a7e331

Browse files
author
llm-net
committed
Add GitHub Actions workflow to build custom router image
Signed-off-by: llm-net <[email protected]>
1 parent 51ddecc commit 0a7e331

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Custom Router Image
2+
3+
on:
4+
push:
5+
branches:
6+
- fix-max-model-len
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
permissions:
13+
contents: read
14+
packages: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
# Login to GitHub Container Registry (GHCR)
26+
- name: Login to GHCR
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build and push image
34+
uses: docker/build-push-action@v5
35+
with:
36+
context: .
37+
file: docker/Dockerfile
38+
push: true
39+
tags: |
40+
ghcr.io/${{ github.repository }}/router:latest
41+
ghcr.io/${{ github.repository }}/router:max-model-len-fix
42+
ghcr.io/${{ github.repository }}/router:${{ github.sha }}
43+
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/router:buildcache
44+
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/router:buildcache,mode=max

0 commit comments

Comments
 (0)