Skip to content

feat(antigravity): add web_search support for Claude via Gemini googl… #12

feat(antigravity): add web_search support for Claude via Gemini googl…

feat(antigravity): add web_search support for Claude via Gemini googl… #12

Workflow file for this run

name: build
on:
push:
branches:
- main
- 'feature/**'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: sususu98/cli-proxy-api
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Build and test
run: |
go build ./...
go test ./... -short || true
- name: Determine tag
id: tag
run: |
git remote add upstream https://github.com/router-for-me/CLIProxyAPI.git || true
git fetch upstream --tags --force
BASE=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
BRANCH="${{ github.ref_name }}"
case "$BRANCH" in
main)
echo "tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BASE}-full" >> $GITHUB_OUTPUT
;;
feature/antigravity-websearch)
echo "tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:websearch,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BASE}-websearch" >> $GITHUB_OUTPUT
;;
feature/session-affinity)
echo "tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:session-affinity,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BASE}-session-affinity" >> $GITHUB_OUTPUT
;;
feature/amp-thinking-mapping)
echo "tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:amp-thinking,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BASE}-amp-thinking" >> $GITHUB_OUTPUT
;;
feature/ci-workflows)
# CI workflows branch, skip docker build
echo "skip=true" >> $GITHUB_OUTPUT
;;
*)
SAFE_BRANCH=$(echo "$BRANCH" | sed 's/[^a-zA-Z0-9]/-/g')
echo "tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${SAFE_BRANCH}" >> $GITHUB_OUTPUT
;;
esac
echo "version=$BASE" >> $GITHUB_OUTPUT
echo "commit=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up QEMU
if: steps.tag.outputs.skip != 'true'
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: steps.tag.outputs.skip != 'true'
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: steps.tag.outputs.skip != 'true'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
if: steps.tag.outputs.skip != 'true'
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
build-args: |
VERSION=${{ steps.tag.outputs.version }}
COMMIT=${{ steps.tag.outputs.commit }}
BUILD_DATE=${{ github.event.head_commit.timestamp }}
tags: ${{ steps.tag.outputs.tags }}