Skip to content

Bump astral-sh/setup-uv from 8.3.2 to 9.0.0 #1272

Bump astral-sh/setup-uv from 8.3.2 to 9.0.0

Bump astral-sh/setup-uv from 8.3.2 to 9.0.0 #1272

name: Auto-merge Dependabot PRs
on:
pull_request:
types: [opened, synchronize, labeled]
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Check update type
id: check_update
run: |
UPDATE_TYPE="${{ steps.metadata.outputs.update-type }}"
echo "Update type: $UPDATE_TYPE"
if [[ "$UPDATE_TYPE" == "version-update:semver-patch" ]] || [[ "$UPDATE_TYPE" == "version-update:semver-minor" ]]; then
echo "should_merge=true" >> $GITHUB_OUTPUT
echo "This is a patch or minor update - will auto-merge"
else
echo "should_merge=false" >> $GITHUB_OUTPUT
echo "This is a major update or other type - skipping auto-merge"
fi
- name: Approve PR
if: steps.check_update.outputs.should_merge == 'true'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge
if: steps.check_update.outputs.should_merge == 'true'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}