Skip to content

Release

Release #4

Workflow file for this run

name: Release
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
latest:
required: false
type: boolean
default: false
tag:
required: true
type: string
description: 'Release tag (chart and images)'
jobs:
set-variables:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.set-vars.outputs.tag }}
latest: ${{ steps.set-vars.outputs.latest }}
steps:
- id: set-vars
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
REF: ${{ github.ref }}
INPUT_TAG: ${{ github.event.inputs.tag }}
INPUT_LATEST: ${{ github.event.inputs.latest }}
run: |
if [[ "$EVENT_NAME" == "push" && "$REF" == refs/tags/v* ]]; then
echo "Tag push event"
TAG="${REF##*/}"
LATEST="true"
else
echo "Workflow dispatch or other event"
TAG="$INPUT_TAG"
# Ensure INPUT_LATEST is 'true' or 'false' string
if [[ "$INPUT_LATEST" == "true" ]]; then
LATEST="true"
else
LATEST="false"
fi
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "latest=$LATEST" >> $GITHUB_OUTPUT
release-images:
needs: set-variables
uses: ./.github/workflows/release-images.yaml
with:
tag: ${{ needs.set-variables.outputs.tag }}
latest: '${{ fromJSON(needs.set-variables.outputs.latest) }}'
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
release-charts:
needs: [set-variables, release-images]
uses: ./.github/workflows/release-charts.yaml
with:
chart_tag: ${{ needs.set-variables.outputs.tag }}
images_tag: ${{ needs.set-variables.outputs.tag }}
latest: '${{ fromJSON(needs.set-variables.outputs.latest) }}'
secrets:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-typescript-sdk:
needs: release-charts
uses: ./.github/workflows/release-typescript-sdk.yaml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}