fix use stable releases

This commit is contained in:
Ishaan Jaff 2024-04-05 17:09:55 -07:00
parent cba0db9cb4
commit 7fdb4e356a

View file

@ -5,10 +5,10 @@ on:
inputs: inputs:
tag: tag:
description: "The tag version you want to build" description: "The tag version you want to build"
stable: release_type:
description: "Build Stable version" description: "The release type you want to build. Can be 'latest', 'stable', 'dev'"
type: boolean type: string
default: false default: "latest"
commit_hash: commit_hash:
description: "Commit hash" description: "Commit hash"
required: true required: true
@ -21,23 +21,6 @@ env:
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs: jobs:
determine-release-type:
runs-on: ubuntu-latest
steps:
- name: Set release type
id: set-release-type
run: |
if [ "${{ github.event.inputs.stable }}" == "true" ]; then
echo "stable release"
echo "type_release=stable" >> $GITHUB_ENV
else
echo "latest release"
echo "type_release=latest" >> $GITHUB_ENV
fi
echo "type_release value: $type_release"
env:
ACTIONS_ALLOW_ENV_MARK: true
docker-hub-deploy: docker-hub-deploy:
if: github.repository == 'BerriAI/litellm' if: github.repository == 'BerriAI/litellm'
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -111,7 +94,7 @@ jobs:
with: with:
context: https://github.com/BerriAI/litellm.git#${{ github.event.inputs.commit_hash}} context: https://github.com/BerriAI/litellm.git#${{ github.event.inputs.commit_hash}}
push: true push: true
tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-${{ env.type_release }} # if a tag is provided, use that, otherwise use the release tag, and if neither is available, use 'latest' tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.release_type }} # if a tag is provided, use that, otherwise use the release tag, and if neither is available, use 'latest'
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 platforms: local,linux/amd64,linux/arm64,linux/arm64/v8
@ -148,7 +131,7 @@ jobs:
context: https://github.com/BerriAI/litellm.git#${{ github.event.inputs.commit_hash}} context: https://github.com/BerriAI/litellm.git#${{ github.event.inputs.commit_hash}}
file: Dockerfile.database file: Dockerfile.database
push: true push: true
tags: ${{ steps.meta-database.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-database.outputs.tags }}-${{ env.type_release }} tags: ${{ steps.meta-database.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-database.outputs.tags }}-${{ github.event.inputs.release_type }}
labels: ${{ steps.meta-database.outputs.labels }} labels: ${{ steps.meta-database.outputs.labels }}
platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 platforms: local,linux/amd64,linux/arm64,linux/arm64/v8
@ -185,7 +168,7 @@ jobs:
context: https://github.com/BerriAI/litellm.git#${{ github.event.inputs.commit_hash}} context: https://github.com/BerriAI/litellm.git#${{ github.event.inputs.commit_hash}}
file: ./litellm-js/spend-logs/Dockerfile file: ./litellm-js/spend-logs/Dockerfile
push: true push: true
tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ env.type_release }} tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.release_type }}
platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 platforms: local,linux/amd64,linux/arm64,linux/arm64/v8
build-and-push-helm-chart: build-and-push-helm-chart: