From 0dd7ab44eddc8635365e4a458be7789a64160838 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 4 Apr 2024 18:00:22 -0700 Subject: [PATCH] set release type on releases --- .github/workflows/ghcr_deploy.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 4acfde6b1..94e0ff71c 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -63,6 +63,12 @@ jobs: packages: write # steps: + - name: Set release type + run: | + if ${{ github.event.inputs.stable == 'true' }}; then + echo "type_release=stable" >> $GITHUB_ENV + else + echo "type_release=latest" >> $GITHUB_ENV - name: Checkout repository uses: actions/checkout@v4 # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. @@ -91,7 +97,7 @@ jobs: with: context: . push: true - tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.stable && 'stable' || 'latest' }} # 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 }}-${{ env.type_release }} # if a tag is provided, use that, otherwise use the release tag, and if neither is available, use 'latest' labels: ${{ steps.meta.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 @@ -138,6 +144,12 @@ jobs: contents: read packages: write steps: + - name: Set release type + run: | + if ${{ github.event.inputs.stable == 'true' }}; then + echo "type_release=stable" >> $GITHUB_ENV + else + echo "type_release=latest" >> $GITHUB_ENV - name: Checkout repository uses: actions/checkout@v4 @@ -165,8 +177,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.stable && 'stable' || 'latest' }} - labels: ${{ steps.meta-spend-logs.outputs.labels }} + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ env.type_release }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 build-and-push-helm-chart: