Skip to content

Commit

Permalink
chore: update Docker build workflow to use GHCR_PAT and add CH-UI ver…
Browse files Browse the repository at this point in the history
…sion to Sidebar
  • Loading branch information
caioricciuti committed Jan 8, 2025
1 parent 9bcaa99 commit c55d3d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GHCR_PAT }}

- name: Extract metadata (tags, labels)
id: meta
Expand Down
6 changes: 5 additions & 1 deletion src/components/common/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ const Sidebar = () => {
const [open, setOpen] = useState(false);
const sidebarRef = useRef<HTMLDivElement>(null);

// version from vite.config.ts
const ch_ui_version = __CH_UI_VERSION__;

const toggleTheme = () => {
setTheme(theme === "dark" ? "light" : "dark");
};
Expand Down Expand Up @@ -342,7 +345,8 @@ const Sidebar = () => {
? "Connected"
: "Disconnected"}
</p>
<p className="text-xs">Version: {version}</p>
<p className="text-xs">Click House Version: {version}</p>
<p className="text-xs">CH-UI Version: {ch_ui_version}</p>
</div>
</PopoverContent>
</Popover>
Expand Down
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
// version
import pkg from "./package.json";

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -10,4 +12,7 @@ export default defineConfig({
"@": path.resolve(__dirname, "./src"),
},
},
define: {
__CH_UI_VERSION__: JSON.stringify(pkg.version),
},
});

0 comments on commit c55d3d0

Please sign in to comment.