Update template pre-commit #60
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 template pre-commit | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| on: | |
| # Allow manual runs through the web UI | |
| workflow_dispatch: | |
| schedule: | |
| # ┌───────── minute (0 - 59) | |
| # │ ┌───────── hour (0 - 23) | |
| # │ │ ┌───────── day of the month (1 - 31) | |
| # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) | |
| # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) | |
| - cron: '0 7 1 * *' # First day of the month at 7am UTC | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Run pre-commit update | |
| id: check | |
| run: pre-commit autoupdate -c '{{ cookiecutter.package_name }}/.pre-commit-config.yaml' | |
| - name: Create pull request | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| delete-branch: true | |
| branch-suffix: timestamp | |
| title: "pre-commit updates in the template" | |
| body: | | |
| This is an autogenerated PR, which updates the `{{ cookiecutter.package_name }}/.pre-commit-config.yaml` file. |