Skip to content

github-actions(deps): bump actions/deploy-pages from 2 to 4 #94

github-actions(deps): bump actions/deploy-pages from 2 to 4

github-actions(deps): bump actions/deploy-pages from 2 to 4 #94

name: Auto-merge Dependencies
on:
pull_request:
branches: [ main, master ]
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f pyproject.toml ] || [ -f setup.py ]; then
pip install .[dev] || pip install .
else
echo "No setup.py or pyproject.toml found"
fi
- name: Run tests
run: |
if [ -d tests ]; then
pytest
elif [ -f webscout/Provider/UNFINISHED/test_lmarena.py ]; then
python webscout/Provider/UNFINISHED/test_lmarena.py
else
echo "No tests found, skipping tests"
fi
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Auto-merge patch and minor updates
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}