Skip to content

0.0.10

0.0.10 #105

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Release
on:
push:
branches:
- main
paths-ignore:
- "**.md"
release:
types:
- published
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'release' }}
jobs:
versions:
name: Versions
runs-on: ubuntu-24.04
permissions:
contents: read
outputs:
go-version: ${{ steps.versions.outputs.go-version }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Mise
uses: jdx/mise-action@9e7f7633ff6f6d6048a9418a68d48f288f50eb14 # v4.2.3
with:
cache: false
experimental: true
install: false
- name: Resolve versions
id: versions
run: echo "go-version=$(mise config get tools.go)" >> "$GITHUB_OUTPUT"
release:
name: Release
needs: versions
permissions:
contents: read
id-token: write
packages: write
uses: docker/github-builder/.github/workflows/build.yml@27ade872c1e2296e62ef15ab3b10d37665e57cf7 # v1.15.0
with:
build-args: |
VERSION=${{ github.ref_name }}
REVISION=${{ github.sha }}
GO_VERSION=${{ needs.versions.outputs.go-version }}
cache: true
meta-images: ghcr.io/${{ github.repository }}
meta-tags: |
type=semver,pattern={{version}}
type=raw,value=rolling,enable=${{ github.event_name == 'release' }}
type=ref,event=branch
output: image
platforms: linux/amd64,linux/arm64
push: true
sbom: true
set-meta-annotations: true
set-meta-labels: true
sign: true
secrets:
registry-auths: |
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
helm:
name: Helm
needs: release
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-24.04
permissions:
contents: read
id-token: write # keyless Cosign signing of the published chart
packages: write
env:
VERSION: ${{ github.event.release.tag_name }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Mise
uses: jdx/mise-action@9e7f7633ff6f6d6048a9418a68d48f288f50eb14 # v4.2.3
with:
cache: false
experimental: true
install_args: --locked
- name: Generate manifests and CRDs
run: mise run helm-crds
- name: Pin the released image digest into the chart
env:
DIGEST: ${{ needs.release.outputs.digest }}
run: |
[ -n "${DIGEST}" ] || { echo "build produced no digest"; exit 1; }
yq -i '.image.digest = strenv(DIGEST)' charts/litellm-operator/values.yaml
- name: Package Helm chart
run: helm package charts/litellm-operator --version "${VERSION}" --app-version "${VERSION}"
- name: Log in to Container Registry
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Helm chart to GHCR
run: helm push "litellm-operator-${VERSION}.tgz" "oci://ghcr.io/${{ github.repository_owner }}/charts"
- name: Sign the published chart with Cosign
run: cosign sign --yes "ghcr.io/${{ github.repository_owner }}/charts/litellm-operator:${VERSION}"