roslyn-tools/merge-pr-pipeline.yml

45 строки
1.1 KiB
YAML

# Pipeline to create Github merge PRs using the dotnet bot.
variables:
# Variable group for the bot secret.
- group: RoslynMergeBot
- name: isDryRun
value: $[eq(variables['Build.Reason'], 'PullRequest')]
- name: isAutomated
value: true
# Make sure the pipeline doesn't build on commits.
trigger: none
# Trigger dryrun on PRs to main.
pr:
- main
schedules:
- cron: "0 */3 * * *"
displayName: Roslyn Merge Tool
branches:
include:
- main
always: true
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDKs'
inputs:
useGlobalJson: true
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: UseDotNet@2
displayName: 'Install .NET Core Runtime'
inputs:
packageType: runtime
version: 3.1.20
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet run -p $(Build.SourcesDirectory)/src/GitHubCreateMergePRs/GitHubCreateMergePRs.csproj --isDryRun=$(isDryRun) --isAutomated=$(isAutomated) --githubToken=$(BotAccount-dotnet-bot-repo-PAT)
displayName: 'Run GitHub Create Merge PRs'