-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (54 loc) · 2.03 KB
/
deploy-cc-data.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
62
63
64
65
66
67
name: Deploy CC Data Function
on:
workflow_dispatch:
inputs:
FUNCTION_APP_NAME:
description: 'The name of the existing function app for deployment'
required: true
# CONFIGURATION
# For help, go to https://github.com/Azure/Actions
#
# 1. Set up the following secrets in your repository:
# AZURE_FUNCTIONAPP_PUBLISH_PROFILE
#
# 2. Change these variables for your configuration:
env:
AZURE_FUNCTIONAPP_NAME: 'cc-app75u4uijj2mhu4-data-function' # set this to your application's name
AZURE_FUNCTIONAPP_PACKAGE_PATH: './Source/CompanyCommunicator.Data.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.Data.Func/Microsoft.Teams.Apps.CompanyCommunicator.Data.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 }}