chore(ci): 移除无用的Gitea构建与部署工作流文件
Some checks failed
Build and Push Docker / build (push) Has been cancelled

- 删除了.gitea/workflows/build.yml文件及其相关构建配置
- 删除了.gitea/workflowschore(ci): 删除Gitea的构建和部署工作流配置

- 移除build.yml文件及其所有构建相关步骤
- 移除deploy.yml文件及其所有部署相关步骤
- 停用基于GitHub Actions/deploy.yml文件及其相关部署配置
-的自动构建和K8s部署流程
- 清理冗余的CI/CD配置文件和环境变量设置 清理了CI流水线中基于GitHub Actions的构建与部署步骤
- 简化了项目仓库的持续集成配置维护工作量
This commit is contained in:
movingsam 2026-03-01 14:02:31 +08:00
parent 18813f905a
commit 36de011e2d
2 changed files with 0 additions and 99 deletions

View File

@ -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

View File

@ -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