From 36de011e2d666a443ee054adec75c50d760ded8a Mon Sep 17 00:00:00 2001 From: movingsam Date: Sun, 1 Mar 2026 14:02:31 +0800 Subject: [PATCH] =?UTF-8?q?chore(ci):=20=E7=A7=BB=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84Gitea=E6=9E=84=E5=BB=BA=E4=B8=8E=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除了.gitea/workflows/build.yml文件及其相关构建配置 - 删除了.gitea/workflowschore(ci): 删除Gitea的构建和部署工作流配置 - 移除build.yml文件及其所有构建相关步骤 - 移除deploy.yml文件及其所有部署相关步骤 - 停用基于GitHub Actions/deploy.yml文件及其相关部署配置 -的自动构建和K8s部署流程 - 清理冗余的CI/CD配置文件和环境变量设置 清理了CI流水线中基于GitHub Actions的构建与部署步骤 - 简化了项目仓库的持续集成配置维护工作量 --- .gitea/workflows/build.yml | 38 ----------------------- .gitea/workflows/deploy.yml | 61 ------------------------------------- 2 files changed, 99 deletions(-) delete mode 100644 .gitea/workflows/build.yml delete mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml deleted file mode 100644 index 65071f7..0000000 --- a/.gitea/workflows/build.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build - -on: - push: - branches: [main, develop] - pull_request: - branches: [main, develop] - -env: - DOTNET_VERSION: '10.0.103' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: Cache NuGet packages - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} - restore-keys: | - ${{ runner.os }}-nuget- - - - name: Restore dependencies - run: dotnet restore src/Fengling.Console.csproj - - - name: Build - run: dotnet build src/Fengling.Console.csproj --configuration Release --no-restore - - - name: Publish - run: dotnet publish src/Fengling.Console.csproj --configuration Release --no-build -o ./publish diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml deleted file mode 100644 index 19386d8..0000000 --- a/.gitea/workflows/deploy.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Deploy to K8s - -on: - push: - branches: [main] - tags: - - "v*" - -env: - REGISTRY: gitea.shtao1.cn - IMAGE_NAME: fengling/fengling-console - KUBECONFIG: ${{ secrets.KUBECONFIG }} - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Extract version - id: version - run: | - VERSION=${{ github.ref_name }} - if [[ $VERSION == v* ]]; then - VERSION=${VERSION#v} - fi - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Login to Gitea - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: fengling - password: ${{ secrets.GITEATOKEN }} - - - name: Deploy to Kubernetes - uses: k8s-toolset/gitops-deploy-action@main - with: - k8s-manifest: | - apiVersion: apps/v1 - kind: Deployment - metadata: - name: fengling-console - namespace: fengling - spec: - replicas: 2 - selector: - matchLabels: - app: fengling-console - template: - metadata: - labels: - app: fengling-console - spec: - containers: - - name: fengling-console - image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} - imagePullPolicy: Always - args: | - kubectl set image deployment/fengling-console fengling-console=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} -n fengling - kubectl rollout status deployment/fengling-console -n fengling --timeout=300s