This repository was archived by the owner on Oct 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (64 loc) · 2.58 KB
/
deploy-dev.yml
File metadata and controls
73 lines (64 loc) · 2.58 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Deploy Function - Dev
on:
push:
branches:
- develop
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '6.x' # set this to the dotnet version to use
jobs:
update:
name: Update
runs-on: windows-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 'Resolve Project Dependencies Using Dotnet'
shell: pwsh
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
dotnet publish Metrics.TimerFunction/Metrics.TimerFunction.csproj --configuration Release
popd
- name: 'Resolve Project Dependencies Using Dotnet'
shell: pwsh
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
dotnet publish Metrics.Function/Metrics.Function.csproj --configuration Release
popd
- name: 'Resolve Project Dependencies Using Dotnet'
shell: pwsh
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
dotnet publish Metrics.StaticFunction/Metrics.StaticFunction.csproj --configuration Release
popd
- uses: pulumi/actions@v5
id: pulumi-up
with:
command: up
stack-name: funkysi1701/metrics-pulumi/dev
upsert: true
comment-on-pr: true
work-dir: Metrics.Pulumi
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
- name: Application Insights Annotations
if: github.ref == 'refs/heads/develop'
uses: wictorwilen/application-insights-action@v1
with:
applicationId: ${{ steps.pulumi-up.outputs.writeAnnotationsApplicationKey }}
apiKey: ${{steps.pulumi-up.outputs.writeAnnotationsApiKey}}
releaseName: ${{ github.event_name }}
message: ${{ github.event.head_commit.message }}
actor: ${{ github.actor }}