Skip to content

Commit 29fcd6b

Browse files
committed
🎮 Wed Oct 23 16:46:50 UTC 2024
1 parent 87bd7dc commit 29fcd6b

File tree

1 file changed

+36
-9
lines changed

1 file changed

+36
-9
lines changed

‎.github/workflows/dotnet.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,46 @@ defaults:
1717
shell: bash
1818
working-directory: ./src/Application/src/RazorPagesTestSample
1919

20+
env:
21+
ACR_NAME: 'f3jiczwhl7laimpnpreg.azurecr.io'
22+
CONTAINER_NAME: 'razorpagestestsample'
23+
TAG_NAME: ${{ github.sha }}
24+
2025
jobs:
2126
build:
2227
runs-on: ubuntu-latest
2328

2429
steps:
2530
- 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
2858
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

Comments
 (0)