Update .NET SDK to 9.0.100-preview.4.24267.66 #409
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dependabot-approve | |
on: pull_request_target | |
permissions: | |
contents: read | |
jobs: | |
dependabot: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
steps: | |
- name: Get dependabot metadata | |
uses: dependabot/fetch-metadata@5e5f99653a5b510e8555840e80cbf1514ad4af38 # v2.1.0 | |
id: dependabot-metadata | |
- name: Generate GitHub application token | |
id: generate-application-token | |
uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 # v3.0.0 | |
with: | |
application_id: ${{ secrets.REVIEWER_APPLICATION_ID }} | |
application_private_key: ${{ secrets.REVIEWER_APPLICATION_PRIVATE_KEY }} | |
permissions: "contents:write, pull_requests:write" | |
- name: Checkout code | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
- name: Approve pull request and enable auto-merge | |
shell: bash | |
if: | | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'actions/cache') || | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'actions/checkout') || | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'actions/dependency-review-action') || | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'actions/download-artifact') || | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'actions/setup-dotnet') || | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'actions/upload-artifact') || | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'dependabot/fetch-metadata') || | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'github/codeql-action') || | |
contains(steps.dependabot-metadata.outputs.dependency-names, 'Microsoft.NET.Test.Sdk') | |
env: | |
GH_TOKEN: ${{ steps.generate-application-token.outputs.token }} | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
run: | | |
gh pr checkout "$PR_URL" | |
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; | |
then gh pr review --approve "$PR_URL" && gh pr merge --auto --squash "$PR_URL" | |
fi |