-
Notifications
You must be signed in to change notification settings - Fork 55
47 lines (44 loc) · 1.56 KB
/
nightly-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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: nightly-build
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 22.x ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
filter: tree:0
- 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
- working-directory: ./src/frontend/admin
run: npm install && npm run build
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget
- working-directory: ./src/backend/YourSolution.AdmServer.Host
run: dotnet publish YourSolution.AdmServer.Host.csproj -c Release
- run: docker build -t nsnail/netadmin:nightly .
- uses: docker/login-action@v3
with:
username: "nsnail"
password: "${{secrets.DOCKER_PASSWORD}}"
- run: docker push nsnail/netadmin:nightly