-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (50 loc) · 1.57 KB
/
application.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
name: application
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
env:
FUNCTION_APP_NAME: myfirstfunctionapp-fa
FUNCTION_APP_PACKAGE_PATH: '/src/MyFirstAzureFunction'
RESOURCE_GROUP_NAME: myfirstfunction-rg
DOTNET_VERSION: '3.1.404'
jobs:
Application:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_RBAC_CREDENTIALS }}
- name: Setup .NET ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 'Resolve Project Dependencies'
shell: bash
run: |
pushd './${{ env.FUNCTION_APP_PACKAGE_PATH }}'
dotnet build --configuration Release --output ./output
popd
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.FUNCTION_APP_NAME }}
package: './${{ env.FUNCTION_APP_PACKAGE_PATH }}/output'
- name: Set App Settings
uses: azure/CLI@v1
with:
inlineScript: |
az functionapp config appsettings set \
--name ${{ env.FUNCTION_APP_NAME }} \
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
--settings \
"Message.Success=This HTTP triggered function executed successfully." \
"Message.Fail=Pass a name in the query string or in the request body for a personalized response."