cookiecutter-django/{{cookiecutter.project_slug}}/.github/workflows/update-dependencies.yaml

45 lines
1.2 KiB
YAML
Raw Normal View History

2023-01-30 16:03:48 +01:00
name: Update dependencies
on:
workflow_dispatch:
schedule:
- cron: '0 18 * * MON'
2023-01-30 16:03:48 +01:00
permissions:
contents: read
2023-01-30 16:03:48 +01:00
jobs:
update:
name: Update dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- name: Update dependencies
run: |
pip install pip-tools invoke
invoke update-dependencies --no-sync
- name: Generate token
uses: tibdex/github-app-token@v1
id: generate-token
with:
2023-02-28 11:21:33 +01:00
app_id: {% raw %}${{ secrets.PR_APP_ID }}{% endraw %}
private_key: {% raw %}${{ secrets.PR_APP_PRIVATE_KEY }}{% endraw %}
2023-01-30 16:03:48 +01:00
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
id: create-pull-request
with:
2023-02-28 11:21:33 +01:00
token: {% raw %}${{ steps.generate-token.outputs.token }}{% endraw %}
2023-01-30 16:03:48 +01:00
commit-message: Update dependencies
base: master
branch: update-dependencies
title: Update dependencies
delete-branch: true