cognee/.github/workflows/autoupdate.yml
Hande 1b5c059b8d
chore: update litellm (#613)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Adjusted a dependency version range for improved compatibility with
newer releases.
- Enhanced dependency management workflow by integrating Poetry and
adding a commit step for tracking changes.
- Updated Python version in the workflow to 3.12 and improved repository
checkout steps.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: vasilije <vas.markovic@gmail.com>
Co-authored-by: Vasilije <8619304+Vasilije1990@users.noreply.github.com>
2025-03-07 00:17:06 +01:00

69 lines
2 KiB
YAML

name: clean | Auto Update Dependencies
on:
schedule:
- cron: '0 0 * * 1' # Run every Monday at midnight
workflow_dispatch: # Allow manual triggering
push:
branches:
- main
- dev
paths:
- 'requirements.txt'
- 'pyproject.toml'
- 'poetry.lock'
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- dev
paths:
- 'requirements.txt'
- 'pyproject.toml'
- 'poetry.lock'
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }} # Personal Access Token with repo scope
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
run: |
pip install --upgrade pip
pip install "poetry>=2.0.0"
- name: Update dependencies with Poetry
run: |
poetry update
# If you still need a requirements.txt synced from Poetry:
poetry export --without-hashes --format requirements.txt --output requirements.txt
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pyproject.toml poetry.lock requirements.txt
git diff --quiet && git diff --staged --quiet || git commit -m "chore: update dependencies"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }} # Personal Access Token with repo scope
commit-message: "chore: update dependencies"
title: "chore: update dependencies"
body: "Automated dependency updates via Poetry"
branch: "chore/dependency-updates"
delete-branch: true