@@ -17,19 +17,46 @@ defaults:
17
17
shell : bash
18
18
working-directory : ./src/Application/src/RazorPagesTestSample
19
19
20
+ env :
21
+ ACR_NAME : ' f3jiczwhl7laimpnpreg.azurecr.io'
22
+ CONTAINER_NAME : ' razorpagestestsample'
23
+ TAG_NAME : ${{ github.sha }}
24
+
20
25
jobs :
21
26
build :
22
27
runs-on : ubuntu-latest
23
28
24
29
steps :
25
30
- uses : actions/checkout@v4
26
- - name : Setup .NET
27
- uses : actions/setup-dotnet@v4
31
+ # - name: Setup .NET
32
+ # uses: actions/setup-dotnet@v4
33
+ # with:
34
+ # dotnet-version: 8.0.x
35
+ # - name: Restore dependencies
36
+ # run: dotnet restore
37
+ # - name: Build
38
+ # run: dotnet build --no-restore
39
+ # - name: Test
40
+ # run: dotnet test --no-build --verbosity normal
41
+
42
+ - name : Azure login
43
+ uses : azure/login@v2
44
+ with :
45
+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
46
+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
47
+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
48
+ enable-AzPSSession : true
49
+
50
+ - uses : docker/login-action@v3
51
+ with :
52
+ login-server : ${{ env.ACR_NAME }}
53
+ username : ${{ secrets.AZURE_CLIENT_ID }}
54
+ password : ${{ secrets.AZURE_CLIENT_SECRET }}
55
+
56
+ - name : Build and push container image to registry
57
+ uses : docker/build-push-action@v2
28
58
with :
29
- dotnet-version : 8.0.x
30
- - name : Restore dependencies
31
- run : dotnet restore
32
- - name : Build
33
- run : dotnet build --no-restore
34
- - name : Test
35
- run : dotnet test --no-build --verbosity normal
59
+ context : .
60
+ push : true
61
+ tags : ${{ env.ACR_NAME }}/${{ env.CONTAINER_NAME }}:${{ env.TAG_NAME }}
62
+ file : ./Dockerfile
0 commit comments