mirror of
https://github.com/open-webui/open-webui
synced 2024-11-28 23:13:30 +00:00
Add image updates to cuda and ollama image jobs
This commit is contained in:
parent
e1022b3a28
commit
63d82dbece
57
.github/workflows/docker-build.yaml
vendored
57
.github/workflows/docker-build.yaml
vendored
@ -26,6 +26,8 @@ jobs:
|
|||||||
- linux/arm64
|
- linux/arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# GitHub Packages requires the entire repository name to be in lowercase
|
||||||
|
# although the repository owner has a lowercase username, this prevents some people from running actions after forking
|
||||||
- name: Set repository and image name to lowercase
|
- name: Set repository and image name to lowercase
|
||||||
run: |
|
run: |
|
||||||
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
||||||
@ -160,21 +162,25 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata for Docker images (cuda tag)
|
- name: Get version number from package.json
|
||||||
|
id: get_version
|
||||||
|
run: |
|
||||||
|
VERSION=$(jq -r '.version' package.json)
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Extract metadata for Docker images
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.FULL_IMAGE_NAME }}
|
images: ${{ env.FULL_IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=raw,value=latest-cuda,enable=${{ github.ref == 'refs/heads/main' }}
|
||||||
type=ref,event=tag
|
type=raw,value=${{ steps.get_version.outputs.version }}-cuda,enable=${{ github.ref == 'refs/heads/main' }}
|
||||||
type=sha,prefix=git-
|
type=ref,event=branch,suffix=-cuda
|
||||||
type=semver,pattern={{version}}
|
type=ref,event=tag,suffix=-cuda
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=sha,prefix=git-,suffix=-cuda
|
||||||
type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda
|
type=semver,pattern={{version}},suffix=-cuda
|
||||||
flavor: |
|
type=semver,pattern={{major}}.{{minor}},suffix=-cuda
|
||||||
latest=${{ github.ref == 'refs/heads/main' }}
|
|
||||||
suffix=-cuda,onlatest=true
|
|
||||||
|
|
||||||
- name: Extract metadata for Docker cache
|
- name: Extract metadata for Docker cache
|
||||||
id: cache-meta
|
id: cache-meta
|
||||||
@ -196,7 +202,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push=true
|
||||||
cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }}
|
cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }}
|
||||||
cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max
|
cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max
|
||||||
build-args: |
|
build-args: |
|
||||||
@ -260,21 +267,25 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata for Docker images (ollama tag)
|
- name: Get version number from package.json
|
||||||
|
id: get_version
|
||||||
|
run: |
|
||||||
|
VERSION=$(jq -r '.version' package.json)
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Extract metadata for Docker images
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.FULL_IMAGE_NAME }}
|
images: ${{ env.FULL_IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=raw,value=latest-ollama,enable=${{ github.ref == 'refs/heads/main' }}
|
||||||
type=ref,event=tag
|
type=raw,value=${{ steps.get_version.outputs.version }}-ollama,enable=${{ github.ref == 'refs/heads/main' }}
|
||||||
type=sha,prefix=git-
|
type=ref,event=branch,suffix=-ollama
|
||||||
type=semver,pattern={{version}}
|
type=ref,event=tag,suffix=-ollama
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=sha,prefix=git-,suffix=-ollama
|
||||||
type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=ollama
|
type=semver,pattern={{version}},suffix=-ollama
|
||||||
flavor: |
|
type=semver,pattern={{major}}.{{minor}},suffix=-ollama
|
||||||
latest=${{ github.ref == 'refs/heads/main' }}
|
|
||||||
suffix=-ollama,onlatest=true
|
|
||||||
|
|
||||||
- name: Extract metadata for Docker cache
|
- name: Extract metadata for Docker cache
|
||||||
id: cache-meta
|
id: cache-meta
|
||||||
@ -296,7 +307,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push=true
|
||||||
cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }}
|
cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }}
|
||||||
cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max
|
cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max
|
||||||
build-args: |
|
build-args: |
|
||||||
@ -316,7 +328,6 @@ jobs:
|
|||||||
path: /tmp/digests/*
|
path: /tmp/digests/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
merge-main-images:
|
merge-main-images:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build-main-image ]
|
needs: [ build-main-image ]
|
||||||
|
Loading…
Reference in New Issue
Block a user