Skip to content

feat: Allow forwarding requests to ollama for other than Vertex AI mo… #15

feat: Allow forwarding requests to ollama for other than Vertex AI mo…

feat: Allow forwarding requests to ollama for other than Vertex AI mo… #15

Workflow file for this run

name: Build, Test and Release
on:
push:
branches:
- master
tags-ignore:
- '**'
paths-ignore:
- '**/*.md'
- LICENSE
pull_request:
jobs:
linux:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.bump.outputs.bumped }}
changed-files: ${{ steps.bump.outputs.changed-files }}
new-version: ${{ steps.bump.outputs.new-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: prantlf/bump-version-action@v2
if: github.ref_name == 'master'
id: bump
with:
bump-files: cmd/ovai/main.go
- uses: prantlf/shelve-changes-action@v2
- run: make RELEASE=1
- uses: prantlf/shelve-output-action@v3
if: ${{ steps.bump.outputs.bumped == 'true' }}
with:
name: ovai
linux-arm:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: prantlf/unshelve-changes-action@v2
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- run: GOOS=linux GOARCH=arm64 make build RELEASE=1
- uses: prantlf/shelve-output-action@v3
with:
name: ovai
arch: arm64
macos:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: prantlf/unshelve-changes-action@v2
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- run: GOOS=darwin GOARCH=amd64 make build RELEASE=1
- uses: prantlf/shelve-output-action@v3
with:
name: ovai
os: macos
macos-arm:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: prantlf/unshelve-changes-action@v2
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- run: GOOS=darwin GOARCH=arm64 make build RELEASE=1
- uses: prantlf/shelve-output-action@v3
with:
name: ovai
os: macos
arch: arm64
windows:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: prantlf/unshelve-changes-action@v2
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- run: |
GOOS=windows GOARCH=amd64 make build RELEASE=1
mv ovai ovai.exe
- uses: prantlf/shelve-output-action@v3
with:
name: ovai
os: windows
windows-arm:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: prantlf/unshelve-changes-action@v2
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- run: |
GOOS=windows GOARCH=arm64 make build RELEASE=1
mv ovai ovai.exe
- uses: prantlf/shelve-output-action@v3
with:
name: ovai
os: windows
arch: arm64
docker:
needs:
- linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prantlf/unshelve-changes-action@v2
if: ${{ needs.linux.outputs.changed == 'true' }}
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: hadolint/hadolint-action@v3.1.0
- uses: docker/build-push-action@v5
with:
push: false
platforms: linux/amd64,linux/arm64
release:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
- linux-arm
- macos
- macos-arm
- windows
- windows-arm
- docker
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: prantlf/unshelve-changes-action@v2
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- uses: prantlf/unshelve-output-action@v6
with:
name: ovai
- uses: prantlf/finish-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker-publish:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
- release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prantlf/unshelve-changes-action@v2
with:
files: ${{ needs.linux.outputs.changed-files }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: |
ghcr.io/prantlf/ovai
prantlf/ovai
tags: |
type=semver,pattern={{version}},value=v${{ needs.linux.outputs.new-version }}
type=semver,pattern={{major}}.{{minor}},value=v${{ needs.linux.outputs.new-version }}
type=semver,pattern={{major}},value=v${{ needs.linux.outputs.new-version }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64