Skip to content

Roslyn Branches

Roslyn Branches #1957

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}}