chore: stage pre-existing main branch changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
whit3rabbit
2026-04-05 15:28:55 -05:00
co-authored by Claude Sonnet 4.6
parent a4f20dca39
commit 2e22cfef3c
11 changed files with 366 additions and 208 deletions
+46 -8
View File
@@ -14,9 +14,50 @@ env:
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/anyllm-proxy
jobs:
test:
name: Test container
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
# Build locally (no push). Primes the GHA cache for the build matrix jobs.
- name: Build test image
uses: docker/build-push-action@v6
with:
context: .
load: true
tags: anyllm-proxy:test
cache-from: type=gha,scope=test-linux/amd64
cache-to: type=gha,scope=test-linux/amd64,mode=max
- name: Smoke test (standalone container)
run: |
docker run -d --name proxy-test \
-e PROXY_OPEN_RELAY=true \
-p 3000:3000 \
anyllm-proxy:test
timeout 30 sh -c 'until curl -sf http://localhost:3000/health; do sleep 1; done'
curl -sf http://localhost:3000/health | grep -q '"status":"ok"'
docker stop proxy-test && docker rm proxy-test
- name: Smoke test (docker compose)
run: |
printf 'PROXY_OPEN_RELAY=true\nWEBUI=1\n' > .env
docker compose up -d
timeout 30 sh -c 'until curl -sf http://localhost:3000/health; do sleep 1; done'
curl -sf http://localhost:3000/health | grep -q '"status":"ok"'
curl -sf http://localhost:3001/admin/health | grep -q '"status":"ok"'
docker compose down -v
build:
name: Build (${{ matrix.platform }})
runs-on: ${{ matrix.runner }}
needs: test
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: read
strategy:
@@ -34,7 +75,6 @@ jobs:
- uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
@@ -49,7 +89,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=sha-,format=short
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=raw,value=latest,enable=true
- name: Build and push by digest
id: build
@@ -57,21 +97,19 @@ jobs:
with:
context: .
platforms: ${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
push: true
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha,scope=${{ matrix.platform }}
cache-to: type=gha,scope=${{ matrix.platform }},mode=max
labels: ${{ steps.meta.outputs.labels }}
- name: Export digest
if: github.event_name != 'pull_request'
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: digests-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
@@ -83,7 +121,7 @@ jobs:
name: Merge multi-arch manifest
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: read
steps:
@@ -114,7 +152,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=sha-,format=short
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=raw,value=latest,enable=true
- name: Create and push multi-arch manifest
working-directory: /tmp/digests