Skip to content

Commit

Permalink
chore: Update Azure resource deployment workflow to use correct SQL c…
Browse files Browse the repository at this point in the history
…onnection string secret name
  • Loading branch information
leandromsft committed Jul 1, 2024
1 parent c1aea7b commit 2d6ea98
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/03-Deployment-Function.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
CONFIGURATION: 'release'
AZ_RG_NAME: 'rg-ghdashboard'
APP_NAME: 'func-ghdashboard'
AZ_FUNC_NAME: 'func-ghdashboard'
CSPROJ: 'src/github-dashboard.function/github-dashboard.function.csproj'

jobs:
Expand Down Expand Up @@ -65,11 +65,24 @@ jobs:
- name: 'Run Azure Functions action'
uses: Azure/functions-action@v1
with:
app-name: ${{ env.APP_NAME }}
app-name: ${{ env.AZ_FUNC_NAME }}
package: my-app-artifact

- name: Set Function Settings
uses: Azure/appservice-settings@v1
with:
app-name: ${{ env.AZ_FUNC_NAME }}
app-settings-json: |
[
{
"name": "MyDbContext",
"value": "${{ env.AZ_SQL_CONNECTION_STRING }}",
"slotSetting": false
}
]
- name: Restart function
run: az functionapp restart --name ${{ env.APP_NAME }} --resource-group ${{ env.AZ_RG_NAME }}
run: az functionapp restart --name ${{ env.AZ_FUNC_NAME }} --resource-group ${{ env.AZ_RG_NAME }}

- name: Run SQL Scripts
uses: azure/sql-action@v2.2.1
Expand Down

0 comments on commit 2d6ea98

Please sign in to comment.