Update Dependencies #1221
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Dependencies | |
on: | |
schedule: | |
# Run every hour | |
- cron: '0 * * * *' | |
workflow_dispatch: # Allow manual triggering | |
jobs: | |
update-dependencies: | |
name: Update dependencies | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Set up poetry | |
run: uv pip install poetry --system | |
- name: Update dependencies | |
id: update | |
run: | | |
# Run the update command | |
make update | |
# Check if there are changes | |
if [[ -z $(git status --porcelain) ]]; then | |
echo "No changes detected" | |
echo "changes_detected=false" >> $GITHUB_OUTPUT | |
else | |
echo "Changes detected" | |
echo "changes_detected=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Create pull request | |
if: steps.update.outputs.changes_detected == 'true' | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Update dependencies | |
branch: update-dependencies | |
base: main | |
delete-branch: true | |
title: "Update dependencies" | |
body: | | |
Automated dependency updates | |
This PR was automatically created by the dependency update workflow. |