Skip to content

Commit fdbec2d

Browse files
committed
Deploy using publish profile
1 parent 13e1979 commit fdbec2d

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

.github/workflows/_functionAppDeployTemplate.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,9 @@ on:
2222
type: string
2323
description: "Specifies the name of the Azure Function."
2424
secrets:
25-
TENANT_ID:
25+
FUNCTION_PUBLISH_PROFILE:
2626
required: true
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."
27+
description: "Specifies the publish profile of the function."
3728

3829
jobs:
3930
deployment:
@@ -65,20 +56,13 @@ jobs:
6556
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
6657
popd
6758
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-
7559
# Deploy Function
7660
- name: Deploy Function
7761
id: function_deploy
7862
uses: Azure/functions-action@v1
7963
with:
8064
app-name: ${{ inputs.function_name }}
8165
package: ${{ inputs.function_directory }}
82-
# publish-profile: ${{ secrets.FUNCTION_PUBLISH_PROFILE }}
66+
publish-profile: ${{ secrets.FUNCTION_PUBLISH_PROFILE }}
8367
scm-do-build-during-deployment: true
8468
enable-oryx-build: true

.github/workflows/functionApp.yml

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

0 commit comments

Comments
 (0)