From ee6fc894ddc243cb0127cf587c2e5ae70101b6a2 Mon Sep 17 00:00:00 2001 From: coulsontl <149155411+coulsontl@users.noreply.github.com> Date: Mon, 20 May 2024 10:03:19 +0800 Subject: [PATCH] update docker build --- .github/workflows/docker.yml | 2 +- .github/workflows/issue-auto-comments.yml | 73 ----------------------- .github/workflows/issue-close-require.yml | 66 -------------------- .github/workflows/issues-translate.yml | 14 ----- .github/workflows/lighthouse.yml | 72 ---------------------- .github/workflows/release.yml | 46 -------------- .github/workflows/sync.yml | 54 ----------------- .github/workflows/test.yml | 27 --------- .github/workflows/wiki-sync.yml | 19 ------ next.config.mjs | 7 +++ 10 files changed, 8 insertions(+), 372 deletions(-) delete mode 100644 .github/workflows/issue-auto-comments.yml delete mode 100644 .github/workflows/issue-close-require.yml delete mode 100644 .github/workflows/issues-translate.yml delete mode 100644 .github/workflows/lighthouse.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/sync.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/wiki-sync.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index cbfce1c8bb62..2d17d94114f0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,7 +22,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: lobehub/lobe-chat + images: coulsontl/lobe-chat tags: | type=raw,value=latest type=ref,event=tag diff --git a/.github/workflows/issue-auto-comments.yml b/.github/workflows/issue-auto-comments.yml deleted file mode 100644 index 124d0044609e..000000000000 --- a/.github/workflows/issue-auto-comments.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Issue Auto Comment -on: - issues: - types: - - opened - - closed - - assigned - pull_request_target: - types: - - opened - - closed - -permissions: - contents: read - -jobs: - run: - permissions: - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - steps: - - name: Auto Comment on Issues Opened - uses: wow-actions/auto-comment@v1 - with: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN}} - issuesOpened: | - 👀 @{{ author }} - - Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. - Please make sure you have given us as much context as possible.\ - 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。 - - name: Auto Comment on Issues Closed - uses: wow-actions/auto-comment@v1 - with: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN}} - issuesClosed: | - ✅ @{{ author }} - - This issue is closed, If you have any questions, you can comment and reply.\ - 此问题已经关闭。如果您有任何问题,可以留言并回复。 - - name: Auto Comment on Pull Request Opened - uses: wow-actions/auto-comment@v1 - with: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN}} - pullRequestOpened: | - 👍 @{{ author }} - - Thank you for raising your pull request and contributing to our Community - Please make sure you have followed our contributing guidelines. We will review it as soon as possible. - If you encounter any problems, please feel free to connect with us.\ - 非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。 - 如果您遇到任何问题,请随时与我们联系。 - - name: Auto Comment on Pull Request Merged - uses: actions-cool/pr-welcome@main - if: github.event.pull_request.merged == true - with: - token: ${{ secrets.GH_TOKEN }} - comment: | - ❤️ Great PR @${{ github.event.pull_request.user.login }} ❤️ - - The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our [discord](https://discord.com/invite/AYFPHvv2jT) and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.\ - 项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 [discord](https://discord.com/invite/AYFPHvv2jT),然后私信 @arvinxx 或 @canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。 - emoji: 'hooray' - pr-emoji: '+1, heart' - - name: Remove inactive - if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login - uses: actions-cool/issues-helper@v3 - with: - actions: 'remove-labels' - token: ${{ secrets.GH_TOKEN }} - issue-number: ${{ github.event.issue.number }} - labels: 'Inactive' diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml deleted file mode 100644 index 96f95ee7e008..000000000000 --- a/.github/workflows/issue-close-require.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Issue Close Require - -on: - schedule: - - cron: '0 0 * * *' - -permissions: - contents: read - -jobs: - issue-check-inactive: - permissions: - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - steps: - - name: check-inactive - uses: actions-cool/issues-helper@v3 - with: - actions: 'check-inactive' - token: ${{ secrets.GH_TOKEN }} - inactive-label: 'Inactive' - inactive-day: 60 - - issue-close-require: - permissions: - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - steps: - - name: need reproduce - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - token: ${{ secrets.GH_TOKEN }} - labels: '✅ Fixed' - inactive-day: 3 - body: | - 👋 @{{ author }} -
- Since the issue was labeled with `✅ Fixed`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.\ - 由于该 issue 被标记为已修复,同时 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 - - name: need reproduce - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - token: ${{ secrets.GH_TOKEN }} - labels: '🤔 Need Reproduce' - inactive-day: 3 - body: | - 👋 @{{ author }} -
- Since the issue was labeled with `🤔 Need Reproduce`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.\ - 由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 - - name: need reproduce - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - token: ${{ secrets.GH_TOKEN }} - labels: "🙅🏻‍♀️ WON'T DO" - inactive-day: 3 - body: | - 👋 @{{ github.event.issue.user.login }} -
- Since the issue was labeled with `🙅🏻‍♀️ WON'T DO`, and no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.\ - 由于该 issue 被标记为暂不处理,同时 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 diff --git a/.github/workflows/issues-translate.yml b/.github/workflows/issues-translate.yml deleted file mode 100644 index fe6f7bc35f78..000000000000 --- a/.github/workflows/issues-translate.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Issue Translate -on: - issue_comment: - types: [created] - issues: - types: [opened] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: usthe/issues-translate-action@v2.7 - with: - BOT_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml deleted file mode 100644 index 39cb86013b43..000000000000 --- a/.github/workflows/lighthouse.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Lighthouse Badger - -env: - TOKEN_NAME: 'GH_TOKEN' - REPO_BRANCH: 'lobehub/lobe-chat lighthouse' - USER_NAME: 'lobehubbot' - USER_EMAIL: 'i@lobehub.com' - AUDIT_TYPE: 'both' - MOBILE_LIGHTHOUSE_PARAMS: '--throttling.cpuSlowdownMultiplier=2' - DESKTOP_LIGHTHOUSE_PARAMS: '--preset=desktop --throttling.cpuSlowdownMultiplier=1' - COMMIT_MESSAGE: '🤖 chore: Lighthouse Results Refreshed' - -on: - schedule: - - cron: '0 0 * * *' # every day - workflow_dispatch: - -jobs: - lighthouse-badger-advanced: - name: ${{ matrix.NAME }} - runs-on: ubuntu-22.04 - timeout-minutes: 8 - strategy: - fail-fast: false - matrix: - include: - - NAME: 'LobeChat | Welcome' - URLS: 'https://chat-preview.lobehub.com/welcome' - BADGES_ARGS: '-b pagespeed -o lighthouse/welcome -r' - COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Welcome' - - NAME: 'LobeChat | Chat' - URLS: 'https://chat-preview.lobehub.com/chat' - BADGES_ARGS: '-b pagespeed -o lighthouse/chat -r' - COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Chat' - - NAME: 'LobeChat | Market' - URLS: 'https://chat-preview.lobehub.com/market' - BADGES_ARGS: '-b pagespeed -o lighthouse/market -r' - COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Market' - - NAME: 'LobeChat | Settings' - URLS: 'https://chat-preview.lobehub.com/settings' - BADGES_ARGS: '-b pagespeed -o lighthouse/settings -r' - COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Settings' - - steps: - - name: Preparatory Tasks - run: | - REPOSITORY=`expr "${{ env.REPO_BRANCH }}" : "\([^ ]*\)"` - BRANCH=`expr "${{ env.REPO_BRANCH }}" : ".* \([^ ]*\)"` - echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV - echo "BRANCH=$BRANCH" >> $GITHUB_ENV - env: - REPO_BRANCH: ${{ matrix.REPO_BRANCH || env.REPO_BRANCH }} - - uses: actions/checkout@v4 - with: - repository: ${{ env.REPOSITORY }} - token: ${{ secrets[matrix.TOKEN_NAME] || secrets[env.TOKEN_NAME] }} - ref: ${{ env.BRANCH }} - - uses: actions/checkout@v4 - with: - repository: 'myactionway/lighthouse-badges' - path: temp_lighthouse_badges_nested - - uses: myactionway/lighthouse-badger-action@v2.2 - with: - urls: ${{ matrix.URLS }} - badges_args: ${{ matrix.BADGES_ARGS }} - audit_type: ${{ matrix.AUDIT_TYPE || env.AUDIT_TYPE }} - mobile_lighthouse_params: ${{ matrix.MOBILE_LIGHTHOUSE_PARAMS || env.MOBILE_LIGHTHOUSE_PARAMS }} - desktop_lighthouse_params: ${{ matrix.DESKTOP_LIGHTHOUSE_PARAMS || env.DESKTOP_LIGHTHOUSE_PARAMS }} - user_name: ${{ matrix.USER_NAME || env.USER_NAME }} - user_email: ${{ matrix.USER_EMAIL || env.USER_EMAIL }} - commit_message: ${{ matrix.COMMIT_MESSAGE || env.COMMIT_MESSAGE }} - max_push_attempts: 5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index b7ab5da31e15..000000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Release CI -on: - push: - branches: - - main - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: ${{ secrets.BUN_VERSION }} - - - name: Install deps - run: bun i - - - name: Lint - run: bun run lint - - - name: Test - run: bun run test - - - name: Release - run: bun run release - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Workflow - run: bun run workflow:readme - - - name: Commit changes - run: |- - git diff - git config --global user.name "lobehubbot" - git config --global user.email "i@lobehub.com" - git add . - git commit -m "📝 docs(bot): Auto sync agents & plugin to readme" || exit 0 - git push - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml deleted file mode 100644 index c1e15054e0b2..000000000000 --- a/.github/workflows/sync.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Upstream Sync - -permissions: - contents: write - issues: write - actions: write - -on: - schedule: - - cron: '0 * * * *' # every hour - workflow_dispatch: - -jobs: - sync_latest_from_upstream: - name: Sync latest commits from upstream repo - runs-on: ubuntu-latest - if: ${{ github.event.repository.fork }} - - steps: - - uses: actions/checkout@v4 - - - name: Clean issue notice - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - labels: '🚨 Sync Fail' - - - name: Sync upstream changes - id: sync - uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 - with: - upstream_sync_repo: lobehub/lobe-chat - upstream_sync_branch: main - target_sync_branch: main - target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set - test_mode: false - - - name: Sync check - if: failure() - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-issue' - title: '🚨 同步失败 | Sync Fail' - labels: '🚨 Sync Fail' - body: | - Due to a change in the workflow file of the [LobeChat][lobechat] upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. Please refer to the detailed [Tutorial][tutorial-en-US] for instructions. - - 由于 [LobeChat][lobechat] 上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,请查看 [详细教程][tutorial-zh-CN] - - ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/273954625-df80c890-0822-4ac2-95e6-c990785cbed5.png) - - [lobechat]: https://github.com/lobehub/lobe-chat - [tutorial-zh-CN]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN - [tutorial-en-US]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index c3a674676cd4..000000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Test CI -on: [push, pull_request] -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Install bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: ${{ secrets.BUN_VERSION }} - - - name: Install deps - run: bun i - - - name: Lint - run: bun run lint - - - name: Test and coverage - run: bun run test:coverage - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} # required diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml deleted file mode 100644 index c83b0b22acf6..000000000000 --- a/.github/workflows/wiki-sync.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Wiki Sync - -on: - workflow_dispatch: - push: - paths: - - 'contributing/**' - branches: - - main - -jobs: - update-wiki: - runs-on: ubuntu-latest - name: Wiki sync - steps: - - uses: OrlovM/Wiki-Action@v1 - with: - path: 'contributing' - token: ${{ secrets.GH_TOKEN }} diff --git a/next.config.mjs b/next.config.mjs index 8914bda07988..1c175bca95e1 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -62,6 +62,13 @@ const nextConfig = { return config; }, + + typescript: { + ignoreBuildErrors: true, + }, + eslint:{ + ignoreDuringBuilds: true, + }, }; const noWrapper = (config) => config;