-
Notifications
You must be signed in to change notification settings - Fork 202
88 lines (83 loc) · 2.78 KB
/
roslyn-branches.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Roslyn Branches
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
inputs:
filter:
type: string
description: Branch name filter
defaults:
run:
working-directory: .\#scripts\roslyn-branches
jobs:
generate-matrix:
name: Generate Run Matrix
runs-on: windows-latest
outputs:
update: ${{steps.generate-matrix.outputs.update}}
cleanup: ${{steps.generate-matrix.outputs.cleanup}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20.14.0'
- run: npm ci
- run: npm run check
- id: generate-matrix
run: npm run generate-matrix
env:
SL_BRANCH_FILTER: ${{ github.event.inputs.filter }}
SL_DEPLOY_MODE: Azure
SL_BUILD_AZURE_TENANT: ${{secrets.AzureTenant}}
SL_BUILD_AZURE_APP_ID: ${{secrets.AzureAppID}}
SL_BUILD_AZURE_SECRET: ${{secrets.AzureSecret}}
update-branch:
name: ${{matrix.branch}} (update)
needs: generate-matrix
runs-on: windows-latest
strategy:
matrix: ${{fromJson(needs.generate-matrix.outputs.update)}}
fail-fast: false
continue-on-error: ${{matrix.optional}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: '20.14.0'
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- run: npm ci
- run: npm run update-branch -- ${{matrix.branch}}
env:
SHARPLAB_TELEMETRY_KEY: ${{secrets.AzureBranchTelemetryKey}}
SL_DEPLOY_MODE: Azure
SL_BUILD_AZURE_TENANT: ${{secrets.AzureTenant}}
SL_BUILD_AZURE_APP_ID: ${{secrets.AzureAppID}}
SL_BUILD_AZURE_SECRET: ${{secrets.AzureSecret}}
cleanup-branch:
name: ${{matrix.branch}} (cleanup)
needs: generate-matrix
runs-on: windows-latest
continue-on-error: ${{matrix.optional}}
if: ${{ needs.generate-matrix.outputs.cleanup != '' && toJson(fromJson(needs.generate-matrix.outputs.cleanup)) != '[]' }}
strategy:
matrix: ${{fromJson(needs.generate-matrix.outputs.cleanup)}}
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: '20.14.0'
- run: npm ci
- run: npm run cleanup-branch -- ${{matrix.branch}} ${{matrix.action}}
env:
SL_DEPLOY_MODE: Azure
SL_BUILD_AZURE_TENANT: ${{secrets.AzureTenant}}
SL_BUILD_AZURE_APP_ID: ${{secrets.AzureAppID}}
SL_BUILD_AZURE_SECRET: ${{secrets.AzureSecret}}