mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-23 14:42:51 +08:00
ci: 🎡 工作流脚本修改 (#113)
This commit is contained in:
parent
e43439a118
commit
823efd4044
24
.github/workflows/nightly-build.yml
vendored
24
.github/workflows/nightly-build.yml
vendored
@ -18,8 +18,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
filter: tree:0
|
filter: tree:0
|
||||||
- name: Setup Node.js
|
- uses: actions/setup-node@v3
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
# https://docs.github.com/zh/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
|
# https://docs.github.com/zh/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
|
||||||
@ -28,12 +27,9 @@ jobs:
|
|||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-npm-${{ hashFiles('./src/frontend/admin/package.json') }}
|
key: ${{ runner.os }}-npm-${{ hashFiles('./src/frontend/admin/package.json') }}
|
||||||
restore-keys: ${{ runner.os }}-npm
|
restore-keys: ${{ runner.os }}-npm
|
||||||
- name: Publish frontend
|
- working-directory: ./src/frontend/admin
|
||||||
working-directory: ./src/frontend/admin
|
run: npm install && npm run build
|
||||||
run:
|
- uses: actions/setup-dotnet@v3
|
||||||
npm install && npm run build
|
|
||||||
- name: Setup .NET
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
with:
|
||||||
dotnet-version: 9.0.x
|
dotnet-version: 9.0.x
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
@ -41,15 +37,11 @@ jobs:
|
|||||||
path: ~/.nuget/packages
|
path: ~/.nuget/packages
|
||||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
|
||||||
restore-keys: ${{ runner.os }}-nuget
|
restore-keys: ${{ runner.os }}-nuget
|
||||||
- name: Publish backend
|
- working-directory: ./src/backend/NetAdmin.AdmServer.Host
|
||||||
working-directory: ./src/backend/NetAdmin.AdmServer.Host
|
|
||||||
run: dotnet publish NetAdmin.AdmServer.Host.csproj -c Release
|
run: dotnet publish NetAdmin.AdmServer.Host.csproj -c Release
|
||||||
- name: Build docker images
|
- run: docker build -t nsnail/netadmin .
|
||||||
run: docker build -t nsnail/netadmin .
|
- uses: docker/login-action@v3
|
||||||
- name: Docker login
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
username: "nsnail"
|
username: "nsnail"
|
||||||
password: "${{secrets.DOCKER_PASSWORD}}"
|
password: "${{secrets.DOCKER_PASSWORD}}"
|
||||||
- name: Push docker images
|
- run: docker push nsnail/netadmin
|
||||||
run: docker push nsnail/netadmin
|
|
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@ -28,8 +28,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-npm-${{ hashFiles('./src/frontend/admin/package.json') }}
|
key: ${{ runner.os }}-npm-${{ hashFiles('./src/frontend/admin/package.json') }}
|
||||||
restore-keys: ${{ runner.os }}-npm
|
restore-keys: ${{ runner.os }}-npm
|
||||||
- working-directory: ./src/frontend/admin
|
- working-directory: ./src/frontend/admin
|
||||||
run:
|
run: npm install && npm run build
|
||||||
npm install && npm run build
|
|
||||||
- uses: actions/setup-dotnet@v3
|
- uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: 9.0.x
|
dotnet-version: 9.0.x
|
||||||
|
Loading…
x
Reference in New Issue
Block a user