Skip to content

feat(gateway): add OpenAI-compatible HTTP gateway on 50052 with auto-… #96

feat(gateway): add OpenAI-compatible HTTP gateway on 50052 with auto-…

feat(gateway): add OpenAI-compatible HTTP gateway on 50052 with auto-… #96

Workflow file for this run

name: Build
on:
push:
branches: [ "main", "dev" ]
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install protoc-gen-doc
run: |
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Generate protobuf code
run: make proto
- name: Download and verify modules (all, incl. test deps)
run: |
go mod download all
go mod verify
go list -deps -test ./... > /dev/null
- name: Run tests
run: make test
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Extract Docker metadata (sha + edge on main)
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=sha
type=raw,value=edge,enable=${{ github.ref == 'refs/heads/main' }}
# Docker 镜像(仅 push 到临时 tag SHA)
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max