Commit 09b63653 by Archer Committed by GitHub

perf: action cache (#300)

parent eb2e383c
...@@ -25,6 +25,13 @@ jobs: ...@@ -25,6 +25,13 @@ jobs:
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with: with:
driver-opts: network=host driver-opts: network=host
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
...@@ -38,7 +45,6 @@ jobs: ...@@ -38,7 +45,6 @@ jobs:
else else
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV
fi fi
- name: Build and publish image for main branch or tag push event - name: Build and publish image for main branch or tag push event
env: env:
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }} DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
...@@ -50,6 +56,8 @@ jobs: ...@@ -50,6 +56,8 @@ jobs:
--label "org.opencontainers.image.description=fastgpt image" \ --label "org.opencontainers.image.description=fastgpt image" \
--label "org.opencontainers.image.licenses=MIT" \ --label "org.opencontainers.image.licenses=MIT" \
--push \ --push \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
-t ${DOCKER_REPO_TAGGED} \ -t ${DOCKER_REPO_TAGGED} \
-f Dockerfile \ -f Dockerfile \
. .
......
...@@ -93,7 +93,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b ...@@ -93,7 +93,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
- [FastGPT 常见问题](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh) - [FastGPT 常见问题](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
- [docker 部署教程视频](https://www.bilibili.com/video/BV1jo4y147fT/) - [docker 部署教程视频](https://www.bilibili.com/video/BV1jo4y147fT/)
- [公众号接入视频教程](https://www.bilibili.com/video/BV1xh4y1t7fy/)
- [FastGPT 知识库演示](https://www.bilibili.com/video/BV1Wo4y1p7i1/) - [FastGPT 知识库演示](https://www.bilibili.com/video/BV1Wo4y1p7i1/)
## 💪 相关项目 ## 💪 相关项目
...@@ -105,6 +104,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b ...@@ -105,6 +104,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
## 🤝 第三方生态 ## 🤝 第三方生态
- [OnWeChat 个人微信/企微机器人](https://doc.fastgpt.run/docs/use-cases/onwechat/)
- [luolinAI: 企微机器人,开箱即用](https://github.com/luolin-ai/FastGPT-Enterprise-WeChatbot) - [luolinAI: 企微机器人,开箱即用](https://github.com/luolin-ai/FastGPT-Enterprise-WeChatbot)
## 🌟 Star History ## 🌟 Star History
......
...@@ -316,9 +316,10 @@ const FileCard = ({ kbId }: { kbId: string }) => { ...@@ -316,9 +316,10 @@ const FileCard = ({ kbId }: { kbId: string }) => {
<Box>{t('common.Delete')}</Box> <Box>{t('common.Delete')}</Box>
</Flex> </Flex>
), ),
onClick: openConfirm(() => { onClick: () =>
openConfirm(() => {
onDeleteFile(file.id); onDeleteFile(file.id);
}) })()
} }
]} ]}
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment