๐Ÿ“ฆ langgenius / dify-python-sdk

๐Ÿ“„ dependency-update.yml ยท 56 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56name: Dependency Update

on:
  schedule:
    # Run every Monday at 9:00 AM UTC
    - cron: '0 9 * * 1'
  workflow_dispatch:

jobs:
  update-dependencies:
    name: Update Dependencies
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: "3.11"

    - name: Install uv
      uses: astral-sh/setup-uv@v3
      with:
        enable-cache: true
        cache-dependency-glob: "pyproject.toml"

    - name: Update dependencies
      run: |
        uv sync --dev
        uv pip list --outdated

    - name: Run tests after update
      run: |
        uv run pytest -v

    - name: Create Pull Request
      uses: peter-evans/create-pull-request@v5
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        commit-message: "chore: update dependencies"
        title: "Automated Dependency Update"
        body: |
          ## Automated Dependency Update

          This PR updates the project dependencies to their latest versions.

          ### Changes Made
          - Updated Python dependencies using `uv sync`
          - All tests are passing after the update

          Please review the changes and ensure everything looks correct before merging.
        branch: dependency-update
        delete-branch: true