4.8.13 test (#3087)
* fix: image expired * fix: datacard navbar ui * perf: build action
This commit is contained in:
parent
3b82ed0aa1
commit
d15ec1ae69
42
.github/workflows/fastgpt-image.yml
vendored
42
.github/workflows/fastgpt-image.yml
vendored
@ -90,3 +90,45 @@ jobs:
|
||||
-t ${Docker_Hub_Tag} \
|
||||
-t ${Docker_Hub_Latest} \
|
||||
.
|
||||
build-fastgpt-images-child-route:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
# Set tag
|
||||
- name: Set image name and tag
|
||||
run: |
|
||||
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
||||
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-child-route:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-child-route:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-child-route:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-child-route:latest" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Build and publish image for main branch or tag push event
|
||||
env:
|
||||
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
|
||||
run: |
|
||||
docker buildx build \
|
||||
-f projects/app/Dockerfile \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--build-arg base_url=fastai \
|
||||
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
|
||||
--label "org.opencontainers.image.description=fastgpt image" \
|
||||
--push \
|
||||
--cache-from=type=local,src=/tmp/.buildx-cache \
|
||||
--cache-to=type=local,dest=/tmp/.buildx-cache \
|
||||
-t ${Git_Tag} \
|
||||
-t ${Git_Latest} \
|
||||
-t ${Ali_Tag} \
|
||||
-t ${Ali_Latest} \
|
||||
-t ${Docker_Hub_Tag} \
|
||||
-t ${Docker_Hub_Latest} \
|
||||
.
|
||||
|
||||
@ -9,6 +9,7 @@ import type { ReadFileResponse } from '../../../worker/readFile/type';
|
||||
import axios from 'axios';
|
||||
import { addLog } from '../../system/log';
|
||||
import { batchRun } from '@fastgpt/global/common/fn/utils';
|
||||
import { addHours } from 'date-fns';
|
||||
|
||||
export type readRawTextByLocalFileParams = {
|
||||
teamId: string;
|
||||
@ -111,6 +112,7 @@ export const readRawContentByFileBuffer = async ({
|
||||
type: MongoImageTypeEnum.collectionImage,
|
||||
base64Img: `data:${item.mime};base64,${item.base64}`,
|
||||
teamId,
|
||||
expiredTime: addHours(new Date(), 1),
|
||||
metadata: {
|
||||
...metadata,
|
||||
mime: item.mime
|
||||
|
||||
@ -35,7 +35,7 @@ SANDBOX_URL=http://localhost:3001
|
||||
PRO_URL=
|
||||
# 页面的地址,用于自动补全相对路径资源的 domain
|
||||
FE_DOMAIN=http://localhost:3000
|
||||
# 二级路由
|
||||
# 二级路由,需要打包时候就确定
|
||||
# NEXT_PUBLIC_BASE_URL=/fastai
|
||||
|
||||
# 日志等级: debug, info, warn, error
|
||||
|
||||
@ -89,14 +89,12 @@ const NavBar = ({ currentTab }: { currentTab: TabEnum }) => {
|
||||
<IconButton
|
||||
p={2}
|
||||
mr={2}
|
||||
w={'1.5rem'}
|
||||
h={'24px'}
|
||||
border={'1px solid'}
|
||||
borderColor={'myGray.200'}
|
||||
boxShadow={'1'}
|
||||
icon={<MyIcon name={'common/arrowLeft'} w={'16px'} color={'myGray.500'} />}
|
||||
bg={'white'}
|
||||
size={'smSquare'}
|
||||
size={'xsSquare'}
|
||||
borderRadius={'50%'}
|
||||
aria-label={''}
|
||||
_hover={'none'}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user