Skip to content

Commit

Permalink
Fix problem in Github workflow
Browse files Browse the repository at this point in the history
Signed-off-by: ApostaC <[email protected]>
  • Loading branch information
ApostaC committed Feb 20, 2025
1 parent b3099dd commit 00dec2f
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/router-docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,42 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Container Registry
# Login to GitHub Container Registry (GHCR)
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract version
# Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: docker.io
username: lmcache
password: ${{ secrets.LMCACHE_DOCKER_SECRET }}

- name: Extract and sanitize version
id: version
run: echo "version=$(python setup.py --version)" >> "$GITHUB_OUTPUT"
run: |
raw_version=$(python setup.py --version)
sanitized_version=$(echo "$raw_version" | sed 's/+/-/g')
echo "version=$sanitized_version" >> "$GITHUB_ENV"
echo "Sanitized version: $sanitized_version"
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
push: true
# Note: also push the image to Docker Hub as the helm chart uses it by default
tags: |
ghcr.io/${{ github.repository }}/router:latest
ghcr.io/${{ github.repository }}/router:${{ steps.version.outputs.version }}
ghcr.io/${{ github.repository }}/router:${{ env.version }}
ghcr.io/${{ github.repository }}/router:${{ github.sha }}
lmcache/lmcache-router:latest
lmcache/lmcache-router:${{ env.version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/router:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/router:buildcache,mode=max

0 comments on commit 00dec2f

Please sign in to comment.