File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66version : 2
77updates :
8- - package-ecosystem : " github-actions" # See documentation for possible values
9- directory : " /" # Location of package manifests
8+ - package-ecosystem : " github-actions"
9+ directory : " /"
10+ schedule :
11+ interval : " weekly"
12+
13+ - package-ecosystem : " npm"
14+ directory : " /node-example"
15+ schedule :
16+ interval : " weekly"
17+
18+ - package-ecosystem : " nuget"
19+ directory : " /dotnet-sample"
20+ schedule :
21+ interval : " weekly"
22+
23+ - package-ecosystem : " docker"
24+ directory : " /container-example"
1025 schedule :
1126 interval : " weekly"
Original file line number Diff line number Diff line change 4747 run : dotnet test --no-build --verbosity normal
4848
4949 - name : dotnet publish
50- run : dotnet publish -c Release -o ./webapp
50+ run : dotnet publish src/dotnet-sample.csproj -c Release -o ./webapp
5151
5252 - name : Upload artifact for deployment job
5353 uses : actions/upload-artifact@v7
Original file line number Diff line number Diff line change 1+ name : 11 Artifacts and Caching
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches : [main]
7+ paths :
8+ - ' node-example/**'
9+ pull_request :
10+ branches : [main]
11+ paths :
12+ - ' node-example/**'
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+ defaults :
18+ run :
19+ working-directory : node-example
20+
21+ steps :
22+ - uses : actions/checkout@v6.0.2
23+
24+ - name : Setup Node.js with caching
25+ uses : actions/setup-node@v6
26+ with :
27+ node-version : 20
28+ cache : ' npm'
29+ cache-dependency-path : node-example/package-lock.json
30+
31+ - name : Install dependencies
32+ run : npm ci
33+
34+ - name : Run tests
35+ run : npm test
36+
37+ - name : Upload test results
38+ if : always()
39+ uses : actions/upload-artifact@v7
40+ with :
41+ name : test-results
42+ path : node-example/
43+ retention-days : 5
44+
45+ download :
46+ needs : build
47+ runs-on : ubuntu-latest
48+
49+ steps :
50+ - name : Download test results
51+ uses : actions/download-artifact@v8
52+ with :
53+ name : test-results
54+ path : results
55+
56+ - name : Display retrieved artifact
57+ run : ls -la results/
Original file line number Diff line number Diff line change 1010 "request" : " launch" ,
1111 "preLaunchTask" : " build" ,
1212 // If you have changed target frameworks, make sure to update the program path.
13- "program" : " ${workspaceFolder}/dotnet-sample/bin/Debug/net7 .0/dotnet-sample.dll" ,
13+ "program" : " ${workspaceFolder}/dotnet-sample/src/ bin/Debug/net10 .0/dotnet-sample.dll" ,
1414 "args" : [],
1515 "cwd" : " ${workspaceFolder}/dotnet-sample" ,
1616 "stopAtEntry" : false ,
Original file line number Diff line number Diff line change 77 "type" : " process" ,
88 "args" : [
99 " build" ,
10- " ${workspaceFolder}/dotnet-sample/dotnet-sample.csproj" ,
10+ " ${workspaceFolder}/dotnet-sample/src/ dotnet-sample.csproj" ,
1111 " /property:GenerateFullPaths=true" ,
1212 " /consoleloggerparameters:NoSummary"
1313 ],
1919 "type" : " process" ,
2020 "args" : [
2121 " publish" ,
22- " ${workspaceFolder}/dotnet-sample/dotnet-sample.csproj" ,
22+ " ${workspaceFolder}/dotnet-sample/src/ dotnet-sample.csproj" ,
2323 " /property:GenerateFullPaths=true" ,
2424 " /consoleloggerparameters:NoSummary"
2525 ],
3333 " watch" ,
3434 " run" ,
3535 " --project" ,
36- " ${workspaceFolder}/dotnet-sample/dotnet-sample.csproj"
36+ " ${workspaceFolder}/dotnet-sample/src/ dotnet-sample.csproj"
3737 ],
3838 "problemMatcher" : " $msCompile"
3939 }
Original file line number Diff line number Diff line change 1- FROM nginx:alpine
1+ FROM nginx:1.27-alpine
2+ EXPOSE 80
3+ HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://localhost/ || exit 1
24COPY src/. /usr/share/nginx/html/
You can’t perform that action at this time.
0 commit comments