File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 11
11
branches : ["main"]
12
12
paths : src/Application/**
13
13
14
+ env :
15
+ registryName : kqrfo3r42nm3umpnpreg.azurecr.io
16
+ repositoryName : techexcel/dotnetcoreapp
17
+ dockerFolderPath : ./src/Application/src/RazorPagesTestSample
18
+ tag : ${{ github.run_number }}
19
+
14
20
jobs :
15
21
build :
16
22
runs-on : ubuntu-latest
27
33
run : dotnet build --no-restore src/Application/src/RazorPagesTestSample/RazorPagesTestSample.csproj
28
34
- name : Test
29
35
run : dotnet test --no-build --verbosity normal src/Application/tests/RazorPagesTestSample.Tests/RazorPagesTestSample.Tests.csproj
36
+
37
+ dockerBuildPush :
38
+ runs-on : ubuntu-latest
39
+ needs : build
40
+
41
+ steps :
42
+ - uses : actions/checkout@v3
43
+
44
+ - name : Docker Login
45
+ # You may pin to the exact commit or the version.
46
+ # uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
47
+
48
+ with :
49
+ # Server address of Docker registry. If not set then will default to Docker Hub
50
+ registry : ${{ secrets.ACR_LOGIN_SERVER }}
51
+ # Username used to log against the Docker registry
52
+ username : ${{ secrets.ACR_USERNAME }}
53
+ # Password or personal access token used to log against the Docker registry
54
+ password : ${{ secrets.ACR_PASSWORD }}
55
+ # Log out from the Docker registry at the end of a job
56
+ logout : true
57
+
58
+ - name : Docker Build
59
+ run : docker build -t $registryName/$repositoryName:$tag --build-arg build_version=$tag $dockerFolderPath
60
+
61
+ - name : Docker Push
62
+ run : docker push $registryName/$repositoryName:$tag
You can’t perform that action at this time.
0 commit comments