diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index f052884..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "monthly" - target-branch: "development" diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml new file mode 100644 index 0000000..b76d580 --- /dev/null +++ b/.github/workflows/dependencies.yml @@ -0,0 +1,52 @@ +name: update dependencies +on: + + schedule: + - cron: '0 0 1 * *' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.PRIVATE_KEY }} + + - uses: actions/checkout@v4 + with: + token: ${{ steps.app-token.outputs.token }} + ref: development + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: pip + + - name: Install pre-commit and pip-tools + run: pip install pre-commit pip-tools + + - name: Run pre-commit autoupdate + run: pre-commit autoupdate + + - name: Run pip-compile + run: pip-compile --upgrade + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6.0.2 + with: + token: ${{ steps.app-token.outputs.token }} + base: development + branch: dependency-updates + delete-branch: true + title: Dependency Updates + commit-message: Dependency updates