Skip to content

Bump Verify.Xunit from 20.5.1 to 20.6.0 #185

Bump Verify.Xunit from 20.5.1 to 20.6.0

Bump Verify.Xunit from 20.5.1 to 20.6.0 #185

Workflow file for this run

---
name: Dependabot Approve and Merge
on:
pull_request_target:
workflow_dispatch:
permissions:
pull-requests: write
contents: write
issues: write
jobs:
dependabot:
name: Auto approve
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Fetch update types
id: update-types
env:
UPDATE_TYPES: ${{ secrets.UPDATE_TYPES }}
run: |
arr=(${UPDATE_TYPES//;/ })
count=${#arr[@]}
echo "Types: ${arr[*]}"
echo "Count: ${count}"
echo "types=${arr[*]}" >> $GITHUB_OUTPUT
echo "count=${count}" >> $GITHUB_OUTPUT
- name: Fetch Dependabot metadata
if: ${{ fromJson(steps.update-types.outputs.count) > 0 }}
id: dependabot-metadata
uses: dependabot/[email protected]
- name: Approve and auto-merge
id: auto-merge
if: ${{ fromJson(steps.update-types.outputs.count) > 0 && contains(steps.update-types.outputs.types, steps.dependabot-metadata.outputs.update-type) }}
run: |
gh pr edit "$PR_URL" --add-label "auto-merged"
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
echo "STATUS=true" >> $GITHUB_OUTPUT
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Write summary
run: |
result="skip. :x:"
if [ "${STATUS}" == "true" ]; then
result=" auto-merge! :white_check_mark:"
fi
echo "### Done with ${result}" >> $GITHUB_STEP_SUMMARY
env:
STATUS: ${{ steps.auto-merge.outputs.STATUS }}