-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.59 KB
/
pull-request-dotnet.yaml
File metadata and controls
56 lines (50 loc) · 1.59 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
name: PR workflow XPRTZ website
run-name: Running PR workflow for the XPRTZ website for branch ${{ github.head_ref }}
concurrency: pull-request-dotnet-${{ github.ref_name }}
on:
workflow_dispatch:
pull_request:
paths:
- 'apps/dotnet/**'
- 'libs/**'
- 'infrastructure/**'
- '.github/**'
types: [opened, synchronize, reopened, closed]
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
apply-infrastructure:
name: Apply infrastructure
if: github.event.action != 'closed'
uses: ./.github/workflows/reusable-apply-infrastructure.yaml
with:
environment: preview
application: dotnet
secrets: inherit
build-dotnet-application:
name: Build XPRTZ Dotnet application
if: github.event.action != 'closed'
uses: ./.github/workflows/reusable-build-application.yaml
with:
application: dotnet
needs: [apply-infrastructure]
deploy-dotnet-application:
name: Deploy XPRTZ Dotnet application
if: github.event.action != 'closed'
uses: ./.github/workflows/reusable-deploy-application.yaml
with:
application: dotnet
storageAccount: ${{ needs.apply-infrastructure.outputs.storageAccount }}
environment: preview
needs: [apply-infrastructure, build-dotnet-application]
secrets: inherit
remove-infrastructure:
name: Remove preview environment infrastructure
if: github.event.action == 'closed'
uses: ./.github/workflows/reusable-destroy-infrastructure.yaml
with:
environment: preview
application: dotnet
secrets: inherit