Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Docker Image Publish

on:
workflow_dispatch:
release:
types: [published]
push:
branches:
- main
Expand Down Expand Up @@ -37,13 +39,24 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/clickhouse/librechat-admin-panel
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=long,prefix=,enable={{is_default_branch}}
Comment on lines +42 to +52

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High workflows/docker-publish.yml:42

The docker/metadata-action config auto-generates a latest tag for every type=semver rule, so publishing release v1.0.0 will overwrite the existing :latest image (which should track main branch builds) with the release image. The explicit type=raw,value=latest,enable={{is_default_branch}} rule then creates a duplicate tag. Consider setting flavor: latest=false to disable the implicit latest tag from semver rules, ensuring :latest only tracks main builds.

       - name: Docker metadata
         id: meta
         uses: docker/metadata-action@v5
         with:
           images: ghcr.io/clickhouse/librechat-admin-panel
+          flavor: latest=false
           tags: |
             type=semver,pattern={{version}}
             type=semver,pattern={{major}}.{{minor}}
             type=semver,pattern={{major}}
             type=raw,value=latest,enable={{is_default_branch}}
             type=sha,format=long,prefix=,enable={{is_default_branch}}
πŸš€ Reply "fix it for me" or copy this AI Prompt for your agent:
In file @.github/workflows/docker-publish.yml around lines 42-52:

The `docker/metadata-action` config auto-generates a `latest` tag for every `type=semver` rule, so publishing release `v1.0.0` will overwrite the existing `:latest` image (which should track `main` branch builds) with the release image. The explicit `type=raw,value=latest,enable={{is_default_branch}}` rule then creates a duplicate tag. Consider setting `flavor: latest=false` to disable the implicit `latest` tag from semver rules, ensuring `:latest` only tracks `main` builds.


- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: |
ghcr.io/clickhouse/librechat-admin-panel:${{ github.sha }}
ghcr.io/clickhouse/librechat-admin-panel:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64