Skip to content

[Analyzers] Add analyzer for capturing lambdas in Task.Run/ContinueWith #32105

[Analyzers] Add analyzer for capturing lambdas in Task.Run/ContinueWith

[Analyzers] Add analyzer for capturing lambdas in Task.Run/ContinueWith #32105

name: Auto bump test package versions
on:
schedule:
- cron: "0 0 * * 0" # Every Sunday at midnight
pull_request_target:
branches: [master]
workflow_dispatch:
jobs:
bump_package_versions:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || startsWith(github.event.pull_request.head.ref, 'dependabot/nuget/tracer/dependabot/') == true
runs-on: windows-latest
permissions:
actions: read # read secrets
id-token: write # Required for dd-octo-sts authentication
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Get dd-octo-sts token
uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4
id: octo-sts
with:
scope: DataDog/dd-trace-dotnet
policy: self.auto_bump_test_package_versions.create-pr
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.pull_request.base.sha }}
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
global-json-file: global.json
- name: "Regenerating package versions"
run: .\tracer\build.ps1 GeneratePackageVersions --PackageVersionCooldownDays 2
- name: Read cooldown report
id: cooldown
if: always()
shell: pwsh
run: |
$report = ""
$reportPath = ".nuke/temp/cooldown_report.md"
if (Test-Path $reportPath) {
$report = Get-Content $reportPath -Raw
}
"report<<EOF" >> $env:GITHUB_OUTPUT
$report >> $env:GITHUB_OUTPUT
"EOF" >> $env:GITHUB_OUTPUT
- name: Create Pull Request
id: pr
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ steps.octo-sts.outputs.token }}
branch: "bot/test-package-versions-bump"
commit-message: "[Test Package Versions Bump]"
delete-branch: true
base: master
title: "[Test Package Versions Bump] Updating package versions "
milestone: "${{steps.rename.outputs.milestone}}"
labels: "area:dependabot,area:test-apps,dependencies"
body: |
Updates the package versions for integration tests.
${{ steps.cooldown.outputs.report }}
- name: Send Slack notification about generating failure
if: failure()
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"github_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBOOK_URL_GENERATEPACKAGEVERSIONS }}