chore: add docker canary image version display
This commit is contained in:
parent
4761c2dd20
commit
dc4d88fc47
1
.github/workflows/docker-publish-canary.yml
vendored
1
.github/workflows/docker-publish-canary.yml
vendored
@ -51,3 +51,4 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
build-args: VERSION=canary-${{ steps.meta.outputs.tags }}
|
||||||
|
@ -17,10 +17,15 @@ RUN apk add --update --no-cache python3 py3-pip g++ make
|
|||||||
FROM base AS static
|
FROM base AS static
|
||||||
WORKDIR /app/tianji
|
WORKDIR /app/tianji
|
||||||
|
|
||||||
|
# use with --build-arg VERSION=xxxx
|
||||||
|
ARG VERSION
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
ENV VITE_VERSION=$VERSION
|
||||||
|
|
||||||
RUN pnpm build:static
|
RUN pnpm build:static
|
||||||
|
|
||||||
# Tianji server ------------------------------
|
# Tianji server ------------------------------
|
||||||
|
@ -7,12 +7,11 @@ import { Button, Divider, Drawer, Dropdown } from 'antd';
|
|||||||
import { useUserStore } from '../store/user';
|
import { useUserStore } from '../store/user';
|
||||||
import { useLogout } from '../api/model/user';
|
import { useLogout } from '../api/model/user';
|
||||||
import { ColorSchemeSwitcher } from '../components/ColorSchemeSwitcher';
|
import { ColorSchemeSwitcher } from '../components/ColorSchemeSwitcher';
|
||||||
import { version } from '@tianji/shared';
|
import { version } from '@/utils/env';
|
||||||
import { useIsMobile } from '../hooks/useIsMobile';
|
import { useIsMobile } from '../hooks/useIsMobile';
|
||||||
import { RiMenuUnfoldLine } from 'react-icons/ri';
|
import { RiMenuUnfoldLine } from 'react-icons/ri';
|
||||||
import { useTranslation } from '@i18next-toolkit/react';
|
import { useTranslation } from '@i18next-toolkit/react';
|
||||||
import { LanguageSelector } from '../components/LanguageSelector';
|
import { LanguageSelector } from '../components/LanguageSelector';
|
||||||
import { useGlobalConfig } from '../hooks/useConfig';
|
|
||||||
|
|
||||||
export const Layout: React.FC = React.memo(() => {
|
export const Layout: React.FC = React.memo(() => {
|
||||||
const [params] = useSearchParams();
|
const [params] = useSearchParams();
|
||||||
|
@ -20,7 +20,7 @@ import { useCurrentWorkspaceId, useUserInfo, useUserStore } from '@/store/user';
|
|||||||
import { languages } from '@/utils/constants';
|
import { languages } from '@/utils/constants';
|
||||||
import { useTranslation, setLanguage } from '@i18next-toolkit/react';
|
import { useTranslation, setLanguage } from '@i18next-toolkit/react';
|
||||||
import { useNavigate } from '@tanstack/react-router';
|
import { useNavigate } from '@tanstack/react-router';
|
||||||
import { version } from '@tianji/shared';
|
import { version } from '@/utils/env';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { LuMoreVertical } from 'react-icons/lu';
|
import { LuMoreVertical } from 'react-icons/lu';
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { version } from '@tianji/shared';
|
import { version as packageJsonVersion } from '@tianji/shared';
|
||||||
|
|
||||||
export const isDev = import.meta.env.MODE === 'development';
|
export const isDev = import.meta.env.MODE === 'development';
|
||||||
|
export const version = import.meta.env.VITE_VERSION || packageJsonVersion;
|
||||||
|
|
||||||
export const anonymousTelemetryUrl = `https://tianji.moonrailgun.com/telemetry/clnzoxcy10001vy2ohi4obbi0/cltg3op5n007lrw4gvr3p8syj.gif?name=tianji-oss&url=${window.location.origin}&v=${version}`;
|
export const anonymousTelemetryUrl = `https://tianji.moonrailgun.com/telemetry/clnzoxcy10001vy2ohi4obbi0/cltg3op5n007lrw4gvr3p8syj.gif?name=tianji-oss&url=${window.location.origin}&v=${version}`;
|
||||||
|
Loading…
Reference in New Issue
Block a user