From 4bbef59df81bdd6e2d8a929ead2f35f758bb0358 Mon Sep 17 00:00:00 2001 From: tanlianwang Date: Wed, 4 Feb 2026 16:26:34 +0800 Subject: [PATCH] =?UTF-8?q?chore(github):=20=E7=A7=BB=E9=99=A4=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug.yml | 50 ------ .github/ISSUE_TEMPLATE/config.yml | 5 - .github/ISSUE_TEMPLATE/feature.yml | 29 ---- .github/PULL_REQUEST_TEMPLATE.md | 9 -- .github/dependabot.yml | 9 -- .../workflows/build-and-push-python-pg.yml | 51 ------ .../workflows/build-and-push-vector-model.yml | 56 ------- .github/workflows/build-and-push.yml | 146 ------------------ .github/workflows/create-pr-from-push.yml | 17 -- .github/workflows/issue-translator.yml | 14 -- .github/workflows/llm-code-review.yml | 28 ---- .github/workflows/sync2gitee.yml | 16 -- .github/workflows/typos_check.yml | 29 ---- 13 files changed, 459 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug.yml delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature.yml delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/build-and-push-python-pg.yml delete mode 100644 .github/workflows/build-and-push-vector-model.yml delete mode 100644 .github/workflows/build-and-push.yml delete mode 100644 .github/workflows/create-pr-from-push.yml delete mode 100644 .github/workflows/issue-translator.yml delete mode 100644 .github/workflows/llm-code-review.yml delete mode 100644 .github/workflows/sync2gitee.yml delete mode 100644 .github/workflows/typos_check.yml diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml deleted file mode 100644 index b1ce85770..000000000 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: 'Bug Report' -description: 'Report an Bug' -title: "[Bug] " -assignees: zyyfit -body: - - type: markdown - attributes: - value: "## Contact Information" - - type: input - validations: - required: false - attributes: - label: "Contact Information" - description: "The ways to quickly contact you: WeChat group number and nickname, email, etc." - - type: markdown - attributes: - value: "## Environment Information" - - type: input - validations: - required: true - attributes: - label: "MaxKB Version" - description: "Log in to the MaxKB Web Console and check the current version on the `About` page in the top right corner." - - type: markdown - attributes: - value: "## Detailed information" - - type: textarea - attributes: - label: "Problem Description" - description: "Briefly describe the issue you’ve encountered." - validations: - required: true - - type: textarea - attributes: - label: "Steps to Reproduce" - description: "How can this issue be reproduced." - validations: - required: true - - type: textarea - attributes: - label: "The expected correct result" - - type: textarea - attributes: - label: "Related log output" - description: "Please paste any relevant log output here. It will automatically be formatted as code, so no backticks are necessary." - render: shell - - type: textarea - attributes: - label: "Additional Information" - description: "If you have any additional information to provide, you can include it here (screenshots, videos, etc., are welcome)." diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index ab410a894..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Questions & Discussions - url: https://github.com/1Panel-dev/MaxKB/discussions - about: Raise questions about the installation, deployment, use and other aspects of the project. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml deleted file mode 100644 index 2f943cba9..000000000 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: 'Feature Request' -description: 'Suggest an idea' -title: '[Feature] ' -assignees: baixin513 -body: - - type: markdown - attributes: - value: "## Environment Information" - - type: input - validations: - required: true - attributes: - label: "MaxKB Version" - description: "Log in to the MaxKB Web Console and check the current version on the `About` page in the top right corner." - - type: markdown - attributes: - value: "## Detailed information" - - type: textarea - attributes: - label: "Please describe your needs or suggestions for improvements" - validations: - required: true - - type: textarea - attributes: - label: "Please describe the solution you suggest" - - type: textarea - attributes: - label: "Additional Information" - description: "If you have any additional information to provide, you can include it here (screenshots, videos, etc., are welcome)." \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1106f42ea..000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -#### What this PR does / why we need it? - -#### Summary of your change - -#### Please indicate you've done the following: - -- [ ] Made sure tests are passing and test coverage is added if needed. -- [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/). -- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed. \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index d3553db65..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "weekly" - timezone: "Asia/Shanghai" - day: "friday" - target-branch: "v3" \ No newline at end of file diff --git a/.github/workflows/build-and-push-python-pg.yml b/.github/workflows/build-and-push-python-pg.yml deleted file mode 100644 index 15851e762..000000000 --- a/.github/workflows/build-and-push-python-pg.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: build-and-push-python-pg - -on: - workflow_dispatch: - inputs: - architecture: - description: 'Architecture' - required: true - default: 'linux/amd64' - type: choice - options: - - linux/amd64 - - linux/arm64 - - linux/amd64,linux/arm64 -jobs: - build-and-push-python-pg-to-ghcr: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.ref_name }} - - name: Prepare - id: prepare - run: | - DOCKER_IMAGE=ghcr.io/1panel-dev/maxkb-base - DOCKER_PLATFORMS=${{ github.event.inputs.architecture }} - TAG_NAME=python3.11-pg17.6 - DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}" - echo ::set-output name=docker_image::${DOCKER_IMAGE} - echo ::set-output name=version::${TAG_NAME} - echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \ - --build-arg VERSION=${TAG_NAME} \ - --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ - --build-arg VCS_REF=${GITHUB_SHA::8} \ - ${DOCKER_IMAGE_TAGS} . - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - cache-image: false - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GH_TOKEN }} - - name: Docker Buildx (build-and-push) - run: | - docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile-base \ No newline at end of file diff --git a/.github/workflows/build-and-push-vector-model.yml b/.github/workflows/build-and-push-vector-model.yml deleted file mode 100644 index 0c51e86f6..000000000 --- a/.github/workflows/build-and-push-vector-model.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: build-and-push-vector-model - -on: - workflow_dispatch: - inputs: - dockerImageTag: - description: 'Docker Image Tag' - default: 'v2.0.3' - required: true - architecture: - description: 'Architecture' - required: true - default: 'linux/amd64' - type: choice - options: - - linux/amd64 - - linux/arm64 - - linux/amd64,linux/arm64 - -jobs: - build-and-push-vector-model-to-ghcr: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.ref_name }} - - name: Prepare - id: prepare - run: | - DOCKER_IMAGE=ghcr.io/1panel-dev/maxkb-vector-model - DOCKER_PLATFORMS=${{ github.event.inputs.architecture }} - TAG_NAME=${{ github.event.inputs.dockerImageTag }} - DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest" - echo ::set-output name=docker_image::${DOCKER_IMAGE} - echo ::set-output name=version::${TAG_NAME} - echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \ - --build-arg VERSION=${TAG_NAME} \ - --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ - --build-arg VCS_REF=${GITHUB_SHA::8} \ - ${DOCKER_IMAGE_TAGS} . - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - cache-image: false - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GH_TOKEN }} - - name: Docker Buildx (build-and-push) - run: | - docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile-vector-model \ No newline at end of file diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml deleted file mode 100644 index 647439edf..000000000 --- a/.github/workflows/build-and-push.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: build-and-push - -run-name: 构建镜像并推送仓库 ${{ github.event.inputs.dockerImageTag }} (${{ github.event.inputs.registry }}) (${{ github.event.inputs.architecture }}) - -on: - workflow_dispatch: - inputs: - dockerImageTag: - description: 'Image Tag' - default: 'v2.4.0-dev' - required: true - dockerImageTagWithLatest: - description: '是否发布latest tag(正式发版时选择,测试版本切勿选择)' - default: false - required: true - type: boolean - architecture: - description: 'Architecture' - required: true - default: 'linux/amd64' - type: choice - options: - - linux/amd64 - - linux/arm64 - - linux/amd64,linux/arm64 - registry: - description: 'Push To Registry' - required: true - default: 'fit2cloud-registry' - type: choice - options: - - fit2cloud-registry - - dockerhub - - dockerhub, fit2cloud-registry - -jobs: - build-and-push-to-fit2cloud-registry: - if: ${{ contains(github.event.inputs.registry, 'fit2cloud') }} - runs-on: ubuntu-latest - steps: - - name: Clear Work Dir - run: | - ls -la - rm -rf -- ./* ./.??* - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.ref_name }} - - name: Prepare - id: prepare - run: | - DOCKER_IMAGE=${{ secrets.FIT2CLOUD_REGISTRY_HOST }}/maxkb/maxkb - DOCKER_PLATFORMS=${{ github.event.inputs.architecture }} - TAG_NAME=${{ github.event.inputs.dockerImageTag }} - TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }} - if [[ ${TAG_NAME_WITH_LATEST} == 'true' ]]; then - DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:${TAG_NAME%%.*} --tag ${DOCKER_IMAGE}:latest" - else - DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}" - fi - echo "buildx_args=--platform ${DOCKER_PLATFORMS} --memory-swap -1 \ - --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=`git rev-parse --short HEAD` --no-cache \ - ${DOCKER_IMAGE_TAGS} ." >> $GITHUB_OUTPUT - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - cache-image: false - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GH_TOKEN }} - - name: Login to FIT2CLOUD Registry - uses: docker/login-action@v3 - with: - registry: ${{ secrets.FIT2CLOUD_REGISTRY_HOST }} - username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }} - password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }} - - name: Build Web - run: | - docker buildx build --no-cache --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile - rm -rf ./ui - cp -r ./web-build-output/ui ./ - rm -rf ./web-build-output - - name: Docker Buildx (build-and-push) - run: | - sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m - docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile - - build-and-push-to-dockerhub: - if: ${{ contains(github.event.inputs.registry, 'dockerhub') }} - runs-on: ubuntu-latest - steps: - - name: Clear Work Dir - run: | - ls -la - rm -rf -- ./* ./.??* - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.ref_name }} - - name: Prepare - id: prepare - run: | - DOCKER_IMAGE=1panel/maxkb - DOCKER_PLATFORMS=${{ github.event.inputs.architecture }} - TAG_NAME=${{ github.event.inputs.dockerImageTag }} - TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }} - if [[ ${TAG_NAME_WITH_LATEST} == 'true' ]]; then - DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:${TAG_NAME%%.*} --tag ${DOCKER_IMAGE}:latest" - else - DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}" - fi - echo "buildx_args=--platform ${DOCKER_PLATFORMS} --memory-swap -1 \ - --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=`git rev-parse --short HEAD` --no-cache \ - ${DOCKER_IMAGE_TAGS} ." >> $GITHUB_OUTPUT - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - cache-image: false - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GH_TOKEN }} - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build Web - run: | - docker buildx build --no-cache --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile - rm -rf ./ui - cp -r ./web-build-output/ui ./ - rm -rf ./web-build-output - - name: Docker Buildx (build-and-push) - run: | - sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m - docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile diff --git a/.github/workflows/create-pr-from-push.yml b/.github/workflows/create-pr-from-push.yml deleted file mode 100644 index 3e5ed9137..000000000 --- a/.github/workflows/create-pr-from-push.yml +++ /dev/null @@ -1,17 +0,0 @@ -on: - push: - branches: - - 'pr@**' - - 'repr@**' - -name: 针对特定分支名自动创建 PR - -jobs: - generic_handler: - name: 自动创建 PR - runs-on: ubuntu-latest - steps: - - name: Create pull request - uses: jumpserver/action-generic-handler@master - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/issue-translator.yml b/.github/workflows/issue-translator.yml deleted file mode 100644 index 67c4e8b6b..000000000 --- a/.github/workflows/issue-translator.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Issue Translator -on: - issue_comment: - types: [created] - issues: - types: [opened] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: usthe/issues-translate-action@v2.7 - with: - IS_MODIFY_TITLE: true - BOT_GITHUB_TOKEN: ${{ secrets.FIT2CLOUDRD_LLM_CODE_REVIEW_TOKEN }} diff --git a/.github/workflows/llm-code-review.yml b/.github/workflows/llm-code-review.yml deleted file mode 100644 index df8b6b2de..000000000 --- a/.github/workflows/llm-code-review.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: LLM Code Review - -permissions: - contents: read - pull-requests: write - -on: - pull_request: - types: [opened, reopened, synchronize] - -jobs: - llm-code-review: - runs-on: ubuntu-latest - steps: - - uses: fit2cloud/LLM-CodeReview-Action@main - env: - GITHUB_TOKEN: ${{ secrets.FIT2CLOUDRD_LLM_CODE_REVIEW_TOKEN }} - OPENAI_API_KEY: ${{ secrets.ALIYUN_LLM_API_KEY }} - LANGUAGE: English - OPENAI_API_ENDPOINT: https://dashscope.aliyuncs.com/compatible-mode/v1 - MODEL: qwen2.5-coder-3b-instruct - PROMPT: "Please check the following code for any irregularities, potential issues, or optimization suggestions, and provide your answers in English." - top_p: 1 - temperature: 1 - # max_tokens: 10000 - MAX_PATCH_LENGTH: 10000 - IGNORE_PATTERNS: "/node_modules,*.md,/dist,/.github" - FILE_PATTERNS: "*.java,*.go,*.py,*.vue,*.ts,*.js,*.css,*.scss,*.html" diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml deleted file mode 100644 index 186cf1570..000000000 --- a/.github/workflows/sync2gitee.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: sync2gitee -on: [push] - -jobs: - repo-sync: - runs-on: ubuntu-latest - steps: - - name: Mirror the Github organization repos to Gitee. - uses: Yikun/hub-mirror-action@master - with: - src: 'github/1Panel-dev' - dst: 'gitee/fit2cloud-feizhiyun' - dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} - dst_token: ${{ secrets.GITEE_TOKEN }} - static_list: "MaxKB" - force_update: true \ No newline at end of file diff --git a/.github/workflows/typos_check.yml b/.github/workflows/typos_check.yml deleted file mode 100644 index 173250cee..000000000 --- a/.github/workflows/typos_check.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Typos Check -on: - workflow_dispatch: - push: - pull_request: - types: [opened, synchronize, reopened] - -jobs: - run: - name: Spell Check with Typos - runs-on: ubuntu-latest - steps: - - name: Checkout Actions Repository - uses: actions/checkout@v4 - with: - ref: ${{ github.ref_name }} - - name: Create config file - run: | - cat < typo-check-config.toml - [files] - extend-exclude = [ - "**/*_svg", - "**/migrations/**" - ] - EOF - - name: Check spelling - uses: crate-ci/typos@master - with: - config: ./typo-check-config.toml