-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (47 loc) · 1.82 KB
/
deploy-cc-prep.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Deploy CC Prep Function
on:
workflow_dispatch:
inputs:
FUNCTION_APP_NAME:
description: 'The name of the existing function app for deployment'
required: true
env:
AZURE_FUNCTIONAPP_NAME: 'cc-app75u4uijj2mhu4-prep-function' # set this to your application's name
AZURE_FUNCTIONAPP_PACKAGE_PATH: './Source/CompanyCommunicator.Prep.Func' # set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '3.1.*' # set this to the dotnet version to use
OUTPUT_PATH: ${{ github.workspace }}/.output
jobs:
build-function:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v2
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Publish Functions
run: dotnet publish ./Source/CompanyCommunicator.Prep.Func/Microsoft.Teams.Apps.CompanyCommunicator.Prep.Func.csproj --configuration Release --output ${{ env.OUTPUT_PATH }}
- name: Package Functions
uses: actions/upload-artifact@v3
with:
name: functions
path: ${{ env.OUTPUT_PATH }}
deploy:
runs-on: ubuntu-latest
needs: [build-function]
steps:
- name: Download Artifact
uses: actions/download-artifact@v1
with:
name: functions
path: ${{ env.OUTPUT_PATH }}
- name: "Login via Azure CLI"
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy Function to Azure
uses: Azure/functions-action@v1
with:
app-name: ${{ github.event.inputs.FUNCTION_APP_NAME }}
package: ${{ env.OUTPUT_PATH }}