From 550386f52ae0594bae920051dd55ab97daa56d36 Mon Sep 17 00:00:00 2001 From: "0xThresh.eth" <0xthresh@protonmail.com> Date: Fri, 23 Aug 2024 11:40:02 -0600 Subject: [PATCH 1/7] Test moving tags in Actions --- .github/workflows/docker-build.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 0e62be3d9..d164f9bc7 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -26,8 +26,6 @@ jobs: - linux/arm64 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 run: | echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV} @@ -56,19 +54,27 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata for Docker images (default latest 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 uses: docker/metadata-action@v5 with: images: ${{ env.FULL_IMAGE_NAME }} + # While 'raw' should work below, I'm worried about collisions and wonder if there isn't a better way to handle this + # https://github.com/docker/metadata-action?tab=readme-ov-file#typeraw tags: | + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=${{ steps.get_version.outputs.version }} type=ref,event=branch type=ref,event=tag type=sha,prefix=git- type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - flavor: | - latest=${{ github.ref == 'refs/heads/main' }} - name: Extract metadata for Docker cache id: cache-meta @@ -82,7 +88,7 @@ jobs: prefix=cache-${{ matrix.platform }}- latest=false - - name: Build Docker image (latest) + - name: Build Docker image uses: docker/build-push-action@v5 id: build with: @@ -90,6 +96,7 @@ jobs: push: true platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }} cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max From ff1ea70dfa8f9cbdd1cfe7144ef803efd1d3ba86 Mon Sep 17 00:00:00 2001 From: "0xThresh.eth" <0xthresh@protonmail.com> Date: Fri, 23 Aug 2024 11:46:30 -0600 Subject: [PATCH 2/7] Only add version tag to main --- .github/workflows/docker-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index d164f9bc7..cab108934 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -69,7 +69,7 @@ jobs: # https://github.com/docker/metadata-action?tab=readme-ov-file#typeraw tags: | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} - type=raw,value=${{ steps.get_version.outputs.version }} + type=raw,value=${{ steps.get_version.outputs.version }},enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=ref,event=tag type=sha,prefix=git- From 9be7c8b969a8b105619c5eb581f0159667dafb02 Mon Sep 17 00:00:00 2001 From: "0xThresh.eth" <0xthresh@protonmail.com> Date: Fri, 23 Aug 2024 12:03:06 -0600 Subject: [PATCH 3/7] Try removing push by digest --- .github/workflows/docker-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index cab108934..967fa8d43 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -97,7 +97,7 @@ jobs: platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} tags: ${{ steps.meta.outputs.tags }} - outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true + outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push=true cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }} cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max build-args: | From e1022b3a28ed3edd9bd1befec47769db668ec5ed Mon Sep 17 00:00:00 2001 From: "0xThresh.eth" <0xthresh@protonmail.com> Date: Fri, 23 Aug 2024 12:10:39 -0600 Subject: [PATCH 4/7] Test bumping the Open WebUI version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7252d8829..175830ef3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-webui", - "version": "0.3.15", + "version": "0.3.16", "private": true, "scripts": { "dev": "npm run pyodide:fetch && vite dev --host", From 63d82dbece3fb683a2f0833332b3d7b6188f2cf6 Mon Sep 17 00:00:00 2001 From: "0xThresh.eth" <0xthresh@protonmail.com> Date: Sun, 25 Aug 2024 15:28:09 -0600 Subject: [PATCH 5/7] Add image updates to cuda and ollama image jobs --- .github/workflows/docker-build.yaml | 57 +++++++++++++++++------------ 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 967fa8d43..ad5e721e3 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -26,6 +26,8 @@ jobs: - linux/arm64 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 run: | echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV} @@ -160,21 +162,25 @@ jobs: username: ${{ github.actor }} 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 uses: docker/metadata-action@v5 with: images: ${{ env.FULL_IMAGE_NAME }} tags: | - type=ref,event=branch - type=ref,event=tag - type=sha,prefix=git- - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda - flavor: | - latest=${{ github.ref == 'refs/heads/main' }} - suffix=-cuda,onlatest=true + type=raw,value=latest-cuda,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=${{ steps.get_version.outputs.version }}-cuda,enable=${{ github.ref == 'refs/heads/main' }} + type=ref,event=branch,suffix=-cuda + type=ref,event=tag,suffix=-cuda + type=sha,prefix=git-,suffix=-cuda + type=semver,pattern={{version}},suffix=-cuda + type=semver,pattern={{major}}.{{minor}},suffix=-cuda - name: Extract metadata for Docker cache id: cache-meta @@ -196,7 +202,8 @@ jobs: push: true platforms: ${{ matrix.platform }} 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-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max build-args: | @@ -260,21 +267,25 @@ jobs: username: ${{ github.actor }} 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 uses: docker/metadata-action@v5 with: images: ${{ env.FULL_IMAGE_NAME }} tags: | - type=ref,event=branch - type=ref,event=tag - type=sha,prefix=git- - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=ollama - flavor: | - latest=${{ github.ref == 'refs/heads/main' }} - suffix=-ollama,onlatest=true + type=raw,value=latest-ollama,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=${{ steps.get_version.outputs.version }}-ollama,enable=${{ github.ref == 'refs/heads/main' }} + type=ref,event=branch,suffix=-ollama + type=ref,event=tag,suffix=-ollama + type=sha,prefix=git-,suffix=-ollama + type=semver,pattern={{version}},suffix=-ollama + type=semver,pattern={{major}}.{{minor}},suffix=-ollama - name: Extract metadata for Docker cache id: cache-meta @@ -296,7 +307,8 @@ jobs: push: true platforms: ${{ matrix.platform }} 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-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max build-args: | @@ -316,7 +328,6 @@ jobs: path: /tmp/digests/* if-no-files-found: error retention-days: 1 - merge-main-images: runs-on: ubuntu-latest needs: [ build-main-image ] From b1355e16bc42ae497ebec3d47499143848c33d03 Mon Sep 17 00:00:00 2001 From: "0xThresh.eth" <0xthresh@protonmail.com> Date: Sun, 25 Aug 2024 15:33:08 -0600 Subject: [PATCH 6/7] Test updating version with all images --- .github/workflows/docker-build.yaml | 2 -- package.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index ad5e721e3..0c9390314 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -67,8 +67,6 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.FULL_IMAGE_NAME }} - # While 'raw' should work below, I'm worried about collisions and wonder if there isn't a better way to handle this - # https://github.com/docker/metadata-action?tab=readme-ov-file#typeraw tags: | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=${{ steps.get_version.outputs.version }},enable=${{ github.ref == 'refs/heads/main' }} diff --git a/package.json b/package.json index 175830ef3..0214d613f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-webui", - "version": "0.3.16", + "version": "0.3.17", "private": true, "scripts": { "dev": "npm run pyodide:fetch && vite dev --host", From 56c9552ab395935981a2462beeae2584b2ec8600 Mon Sep 17 00:00:00 2001 From: "James W." <104535511+0xThresh@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:46:21 -0700 Subject: [PATCH 7/7] Reset package.json to correct version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0214d613f..7252d8829 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-webui", - "version": "0.3.17", + "version": "0.3.15", "private": true, "scripts": { "dev": "npm run pyodide:fetch && vite dev --host",