File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/auto-upgrade-pyproject.yml
2+ name : Auto upgrade pyproject constraints
3+
4+ on :
5+ schedule :
6+ - cron : " 0 6 * * 1" # Mondays 06:00 UTC
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : write
11+ pull-requests : write
12+
13+ jobs :
14+ upgrade :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v5
18+
19+ - name : Set up Python
20+ uses : actions/setup-python@v6
21+ with :
22+ python-version : " 3.12"
23+
24+ - name : Install deps
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install tomlkit packaging
28+
29+ - name : Run updater (caret, no majors, no pre-releases)
30+ run : |
31+ python scripts/pyproject_updater.py --strategy caret --groups main,dev --respect-major --no-prerelease
32+
33+ - name : Create PR if changed
34+ run : |
35+ if ! git diff --quiet; then
36+ git checkout -b chore/upgrade-pyproject-constraints
37+ git config user.name "github-actions[bot]"
38+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
39+ git add pyproject.toml
40+ git commit -m "chore: upgrade dependency constraints in pyproject"
41+ git push --force --set-upstream origin chore/upgrade-pyproject-constraints
42+ gh pr create --title "chore: upgrade pyproject constraints" \
43+ --body "Automated update of dependency constraints via PyPI latest." \
44+ --base "${GITHUB_REF_NAME:-main}" || true
45+ fi
46+ env :
47+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments