File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,45 @@ jobs:
22
22
build :
23
23
24
24
runs-on : ubuntu-latest
25
-
25
+
26
26
steps :
27
27
- uses : actions/checkout@v3
28
28
- name : Setup .NET
29
29
uses : actions/setup-dotnet@v3
30
-
30
+ with :
31
+ dotnet-version : 8.0
32
+
31
33
- name : Restore dependencies
32
34
run : dotnet restore ./src/Application/src/RazorPagesTestSample/RazorPagesTestSample.csproj
33
35
- name : Build
34
36
run : dotnet build --no-restore ./src/Application/src/RazorPagesTestSample/RazorPagesTestSample.csproj
35
37
- name : Test
36
38
run : dotnet test --no-build --verbosity normal ./src/Application/tests/RazorPagesTestSample.Tests/RazorPagesTestSample.Tests.csproj
39
+
40
+ dockerBuildPush :
41
+
42
+ runs-on : ubuntu-latest
43
+ needs : build
44
+
45
+ steps :
46
+ - uses : actions/checkout@v3
47
+
48
+ - name : Docker Login
49
+ # You may pin to the exact commit or the version.
50
+ # uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
51
+
52
+ with :
53
+ # Server address of Docker registry. If not set then will default to Docker Hub
54
+ registry : ${{ secrets.ACR_LOGIN_SERVER }}
55
+ # Username used to log against the Docker registry
56
+ username : ${{ secrets.ACR_USERNAME }}
57
+ # Password or personal access token used to log against the Docker registry
58
+ password : ${{ secrets.ACR_PASSWORD }}
59
+ # Log out from the Docker registry at the end of a job
60
+ logout : true
61
+
62
+ - name : Docker Build
63
+ run : docker build -t $registryName/$repositoryName:$tag --build-arg build_version=$tag $dockerFolderPath
64
+
65
+ - name : Docker Push
66
+ run : docker push $registryName/$repositoryName:$tag
You can’t perform that action at this time.
0 commit comments