Update deps #131
This file contains 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 deps | |
on: | |
push: | |
branches: | |
main | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
update_dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pdm | |
uses: pdm-project/setup-pdm@v4 | |
- name: "Update dependencies" | |
run: | | |
pdm install | |
echo 'SUMMARY<<EOF' >> $GITHUB_OUTPUT | |
pdm update >> $GITHUB_OUTPUT | |
echo 'EOF' >> $GITHUB_OUTPUT | |
shell: bash | |
id: pdm-update | |
- id: detect-changes | |
shell: bash | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
else | |
echo "changed=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Create Pull Request | |
if: steps.detect-changes.outputs.changed == 'true' | |
uses: peter-evans/create-pull-request@v6 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
commit-message: "[CI] Auto update dependencies" | |
sign-commits: true | |
branch: action/update-deps | |
delete-branch: true | |
title: "[CI] Update dependencies" | |
body: | | |
## Update summary | |
```shell | |
${{ steps.pdm-update.outputs.SUMMARY }} | |
``` | |
*Auto-generated by dependencies update action* | |
labels: | | |
automated pr | |
draft: false |