Skip to content

Commit 865b223

Browse files
committed
Test deployment with func tools
1 parent e80e3ec commit 865b223

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

.github/workflows/_functionAppDeployTemplate.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,18 @@ on:
2222
type: string
2323
description: "Specifies the name of the Azure Function."
2424
secrets:
25-
FUNCTION_PUBLISH_PROFILE:
25+
TENANT_ID:
2626
required: true
27-
description: "Specifies the publish profile of the function."
27+
description: "Specifies the tenant id of the deployment."
28+
CLIENT_ID:
29+
required: true
30+
description: "Specifies the client id."
31+
CLIENT_SECRET:
32+
required: true
33+
description: "Specifies the client secret."
34+
SUBSCRIPTION_ID:
35+
required: true
36+
description: "Specifies the client id."
2837

2938
jobs:
3039
deployment:
@@ -56,13 +65,20 @@ jobs:
5665
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
5766
popd
5867
68+
# Login to Azure
69+
- name: Azure Login
70+
id: azure_login
71+
uses: azure/login@v1
72+
with:
73+
creds: '{"clientId":"${{ secrets.CLIENT_ID }}","clientSecret":"${{ secrets.CLIENT_SECRET }}","subscriptionId":"${{ secrets.SUBSCRIPTION_ID }}","tenantId":"${{ secrets.TENANT_ID }}"}'
74+
5975
# Deploy Function
6076
- name: Deploy Function
6177
id: function_deploy
62-
uses: Azure/functions-action@v1
63-
with:
64-
app-name: ${{ inputs.function_name }}
65-
package: ${{ inputs.function_directory }}
66-
publish-profile: ${{ secrets.FUNCTION_PUBLISH_PROFILE }}
67-
scm-do-build-during-deployment: true
68-
enable-oryx-build: true
78+
working-directory: ${{ inputs.function_directory }}
79+
shell: bash
80+
run: |
81+
func azure functionapp publish ${{ inputs.function_name }} \
82+
--build remote \
83+
--build-native-deps
84+

.github/workflows/functionApp.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,7 @@ jobs:
3131
function_directory: "./code/function"
3232
function_name: "myfunc-dev-fctn001"
3333
secrets:
34-
FUNCTION_PUBLISH_PROFILE: ${{ secrets.FUNCTION_PUBLISH_PROFILE }}
34+
TENANT_ID: ${{ secrets.TENANT_ID }}
35+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
36+
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
37+
SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }}

0 commit comments

Comments
 (0)