Skip to content

Commit 6bcd42e

Browse files
committed
Update function workflow
1 parent b3016f9 commit 6bcd42e

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

.github/workflows/_functionAppDeployTemplate.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,21 @@ on:
2121
required: true
2222
type: string
2323
description: "Specifies the name of the Azure Function."
24-
secrets:
25-
TENANT_ID:
24+
tenant_id:
2625
required: true
26+
type: string
2727
description: "Specifies the tenant id of the deployment."
28+
subscription_id:
29+
required: true
30+
type: string
31+
description: "Specifies the subscription id of the deployment."
32+
secrets:
2833
CLIENT_ID:
2934
required: true
3035
description: "Specifies the client id."
3136
CLIENT_SECRET:
3237
required: true
3338
description: "Specifies the client secret."
34-
SUBSCRIPTION_ID:
35-
required: true
36-
description: "Specifies the client id."
3739

3840
jobs:
3941
deployment:
@@ -75,7 +77,7 @@ jobs:
7577
id: azure_login
7678
uses: azure/login@v1
7779
with:
78-
creds: '{"clientId":"${{ secrets.CLIENT_ID }}","clientSecret":"${{ secrets.CLIENT_SECRET }}","subscriptionId":"${{ secrets.SUBSCRIPTION_ID }}","tenantId":"${{ secrets.TENANT_ID }}"}'
80+
creds: '{"clientId":"${{ secrets.CLIENT_ID }}","clientSecret":"${{ secrets.CLIENT_SECRET }}","subscriptionId":"${{ inputs.subscription_id }}","tenantId":"${{ inputs.tenant_id }}"}'
7981

8082
# Deploy Function
8183
- name: Deploy Function

.github/workflows/functionApp.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ jobs:
3636
USER_NAME: ${{ github.actor }}
3737
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
3838

39-
function_deploy:
40-
uses: ./.github/workflows/_functionAppDeployTemplate.yml
41-
name: "Function App Deploy"
42-
needs: [function_test]
43-
if: github.event_name == 'push' || github.event_name == 'release'
44-
with:
45-
environment: "dev"
46-
python_version: "3.10"
47-
function_directory: "./code/function"
48-
function_name: "myfunc-dev-fctn001"
49-
secrets:
50-
TENANT_ID: ${{ secrets.TENANT_ID }}
51-
CLIENT_ID: ${{ secrets.CLIENT_ID }}
52-
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
53-
SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }}
39+
# function_deploy:
40+
# uses: ./.github/workflows/_functionAppDeployTemplate.yml
41+
# name: "Function App Deploy"
42+
# needs: [function_test]
43+
# if: github.event_name == 'push' || github.event_name == 'release'
44+
# with:
45+
# environment: "dev"
46+
# python_version: "3.10"
47+
# function_directory: "./code/function"
48+
# function_name: "myfunc-dev-fctn001"
49+
# tenant_id: "3556be79-2979-4b19-a1af-4dd4e6d9ed7e"
50+
# subscription_id: "8f171ff9-2b5b-4f0f-aed5-7fa360a1d094"
51+
# secrets:
52+
# CLIENT_ID: ${{ secrets.CLIENT_ID }}
53+
# CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}

0 commit comments

Comments
 (0)