-
Notifications
You must be signed in to change notification settings - Fork 24
40 lines (33 loc) · 1.18 KB
/
examples-webapi-net6-container.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
name: Deploy .NET 6 container example to ACR
on:
workflow_dispatch:
env:
IMAGE_NAME: epprofilernet6container
CONTAINER_APP_NAME: epprofiler6containerapp
CONTAINER_APP_RESOURCE_GROUP: epprofilernet6container
jobs:
docker_build_push_acr:
name: 'Docker Build and Push to ACR'
runs-on: ubuntu-latest
environment: production
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v2
- name: 'Docker Login'
uses: docker/login-action@v2
with:
registry: ${{ secrets.ACR_ENDPOINT }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Build the WebAPI image and push it to ACR
uses: docker/build-push-action@v4
with:
context: examples/EnableServiceProfilerForContainerAppNet6
file: examples/EnableServiceProfilerForContainerAppNet6/dockerfile
push: true
tags: ${{ secrets.ACR_ENDPOINT }}/${{ env.IMAGE_NAME }}:${{ github.sha }}