-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (41 loc) · 1.33 KB
/
dotnet.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
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 14
- name: Restore
run: dotnet restore
- name: Build Parbad.Sample.EntityFrameworkCore
run: dotnet build Storage/Parbad.Sample.EntityFrameworkCore/Parbad.Sample.EntityFrameworkCore.csproj
- name: Build Parbad.Sample.AspNetCore
run: dotnet build Web/Parbad.Sample.AspNetCore/Parbad.Sample.AspNetCore.csproj
- name: Build Parbad.Sample.Angular
run: dotnet build Web/Parbad.Sample.Angular/Parbad.Sample.Angular.csproj
- name: Docker build
run: |
cd Web/Parbad.Sample.Docker
docker build . -t ssoltani/parbad.samples.aspnetcore:latest
- name: Docker login
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
username: ssoltani
password: ${{ secrets.DOCKER_TOKEN }}
- name: Docker push
if: github.event_name != 'pull_request'
run: docker push ssoltani/parbad.samples.aspnetcore:latest