diff --git a/.github/workflows/pre-commit-update.yml b/.github/workflows/pre-commit-update.yml new file mode 100644 index 0000000..82b73c2 --- /dev/null +++ b/.github/workflows/pre-commit-update.yml @@ -0,0 +1,34 @@ +name: Pre-commit auto-update +on: + schedule: + # Run on fridays + - cron: "0 0 * * 5" + +jobs: + auto-update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.3.0 + + - name: Set up Python + uses: actions/setup-python@v4.5.0 + with: + python-version: "3.9" + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit autoupdate + run: pre-commit autoupdate + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4.2.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: update/pre-commit-autoupdate + title: Auto-update pre-commit hooks + commit-message: Auto-update pre-commit hooks + body: | + Update versions of tools in pre-commit + configs to latest version + labels: dependencies