mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-06-20 02:38:15 +08:00
feat: ✨ 基础模块
注册登录 用户管理 角色管理 部门管理 消息管理 接口管理 菜单管理 字典管理 缓存管理 请求日志 系统设置 版本信息 代码生成
This commit is contained in:
52
.github/workflows/ci.yml
vendored
Normal file
52
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
# This workflow will build a .NET project
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [ 20.x ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
# https://docs.github.com/zh/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-npm-${{ hashFiles('./src/frontend/admin/package.json') }}
|
||||
restore-keys: ${{ runner.os }}-npm
|
||||
- name: Publish frontend
|
||||
working-directory: ./src/frontend/admin
|
||||
run:
|
||||
npm install && npm run build
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
|
||||
restore-keys: ${{ runner.os }}-nuget
|
||||
- name: Publish backend
|
||||
working-directory: ./src/backend/NetAdmin.BizServer.Host
|
||||
run: dotnet publish NetAdmin.BizServer.Host.csproj -c Release
|
||||
- name: Build docker images
|
||||
run: docker build -t nsnail/netadmin .
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: "nsnail"
|
||||
password: "${{secrets.DOCKER_PASSWORD}}"
|
||||
- name: Push docker images
|
||||
run: docker push nsnail/netadmin
|
Reference in New Issue
Block a user