-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.13 KB
/
Copy pathfunction-deploy.yml
File metadata and controls
44 lines (36 loc) · 1.13 KB
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
name: Deploy feedback function
on:
push:
branches: [main]
paths:
- 'functions/**'
- 'infra/**'
workflow_dispatch:
permissions:
id-token: write # required for OIDC login
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Azure login (OIDC)
uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Provision Azure resources
# provision.sh echoes FUNCAPP=... and RG=... to stdout;
# appending to $GITHUB_ENV makes them available in later steps.
run: bash infra/provision.sh >> "$GITHUB_ENV"
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Publish function
run: dotnet publish functions/feedback/Feedback.csproj -c Release -o ./publish
- name: Deploy to Azure Functions
uses: azure/functions-action@v1
with:
app-name: ${{ env.FUNCAPP }}
package: ./publish