diff --git a/.github/bump_docs.sh b/.github/bump_docs.sh new file mode 100755 index 000000000000..169022aaf26c --- /dev/null +++ b/.github/bump_docs.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -xe +REPO=$1 + +LATEST_TAG=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | jq -r '.name') + +cat <<< $(jq ".version = \"$LATEST_TAG\"" docs/data/version.json) > docs/data/version.json diff --git a/.github/workflows/bump_docs.yaml b/.github/workflows/bump_docs.yaml new file mode 100644 index 000000000000..7d52359f1d1a --- /dev/null +++ b/.github/workflows/bump_docs.yaml @@ -0,0 +1,31 @@ +name: Bump dependencies +on: + schedule: + - cron: 0 20 * * * + workflow_dispatch: +jobs: + bump: + strategy: + fail-fast: false + matrix: + include: + - repository: "mudler/LocalAI" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Bump dependencies 🔧 + run: | + bash .github/bump_docs.sh ${{ matrix.repository }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.UPDATE_BOT_TOKEN }} + push-to-fork: ci-forks/LocalAI + commit-message: ':arrow_up: Update docs version ${{ matrix.repository }}' + title: ':arrow_up: Update docs version ${{ matrix.repository }}' + branch: "update/docs" + body: Bump of ${{ matrix.repository }} version inside docs + signoff: true + + + diff --git a/docs/content/getting_started/_index.en.md b/docs/content/getting_started/_index.en.md index b166dd033d32..60ea3d47c377 100644 --- a/docs/content/getting_started/_index.en.md +++ b/docs/content/getting_started/_index.en.md @@ -123,9 +123,9 @@ LocalAI has a set of images to support CUDA, ffmpeg and 'vanilla' (CPU-only). Th {{% tab name="Vanilla / CPU Images" %}} - `master` - `latest` -- `v2.0.0` -- `v2.0.0-ffmpeg` -- `v2.0.0-ffmpeg-core` +- `{{< version >}}` +- `{{< version >}}-ffmpeg` +- `{{< version >}}-ffmpeg-core` Core Images - Smaller images without predownload python dependencies {{% /tab %}} @@ -133,10 +133,10 @@ Core Images - Smaller images without predownload python dependencies {{% tab name="GPU Images CUDA 11" %}} - `master-cublas-cuda11` - `master-cublas-cuda11-core` -- `v2.0.0-cublas-cuda11` -- `v2.0.0-cublas-cuda11-core` -- `v2.0.0-cublas-cuda11-ffmpeg` -- `v2.0.0-cublas-cuda11-ffmpeg-core` +- `{{< version >}}-cublas-cuda11` +- `{{< version >}}-cublas-cuda11-core` +- `{{< version >}}-cublas-cuda11-ffmpeg` +- `{{< version >}}-cublas-cuda11-ffmpeg-core` Core Images - Smaller images without predownload python dependencies {{% /tab %}} @@ -144,10 +144,10 @@ Core Images - Smaller images without predownload python dependencies {{% tab name="GPU Images CUDA 12" %}} - `master-cublas-cuda12` - `master-cublas-cuda12-core` -- `v2.0.0-cublas-cuda12` -- `v2.0.0-cublas-cuda12-core` -- `v2.0.0-cublas-cuda12-ffmpeg` -- `v2.0.0-cublas-cuda12-ffmpeg-core` +- `{{< version >}}-cublas-cuda12` +- `{{< version >}}-cublas-cuda12-core` +- `{{< version >}}-cublas-cuda12-ffmpeg` +- `{{< version >}}-cublas-cuda12-ffmpeg-core` Core Images - Smaller images without predownload python dependencies @@ -158,9 +158,9 @@ Core Images - Smaller images without predownload python dependencies Example: - Standard (GPT + `stablediffusion`): `quay.io/go-skynet/local-ai:latest` -- FFmpeg: `quay.io/go-skynet/local-ai:v2.0.0-ffmpeg` -- CUDA 11+FFmpeg: `quay.io/go-skynet/local-ai:v2.0.0-cublas-cuda11-ffmpeg` -- CUDA 12+FFmpeg: `quay.io/go-skynet/local-ai:v2.0.0-cublas-cuda12-ffmpeg` +- FFmpeg: `quay.io/go-skynet/local-ai:{{< version >}}-ffmpeg` +- CUDA 11+FFmpeg: `quay.io/go-skynet/local-ai:{{< version >}}-cublas-cuda11-ffmpeg` +- CUDA 12+FFmpeg: `quay.io/go-skynet/local-ai:{{< version >}}-cublas-cuda12-ffmpeg` {{% notice note %}} Note: the binary inside the image is pre-compiled, and might not suite all CPUs. diff --git a/docs/data/version.json b/docs/data/version.json new file mode 100644 index 000000000000..78581eba1c23 --- /dev/null +++ b/docs/data/version.json @@ -0,0 +1,3 @@ +{ + "version": "v2.1.0" +} diff --git a/docs/layouts/shortcodes/version.html b/docs/layouts/shortcodes/version.html new file mode 100644 index 000000000000..9a87dadf1b6f --- /dev/null +++ b/docs/layouts/shortcodes/version.html @@ -0,0 +1 @@ +{{ $.Site.Data.version.version }} \ No newline at end of file