diff --git a/.github/workflows/pre_commit_update_workflow.yml b/.github/workflows/pre_commit_update_workflow.yml index 1b563f74..5e4d3e18 100644 --- a/.github/workflows/pre_commit_update_workflow.yml +++ b/.github/workflows/pre_commit_update_workflow.yml @@ -28,8 +28,8 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} - - name: Install pre-commit - run: pip install pre-commit + - name: Install pre-commit and pre-commit-update + run: pip install pre-commit pre-commit-update - name: Apply and commit updates run: | @@ -39,7 +39,8 @@ jobs: git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git checkout -b update-pre-commit-deps - pre-commit autoupdate + # pre-commit-update doesn't try to include non-release versions + pre-commit-update git add . # The second command will fail if no changes were present, so we ignore it git commit -m "Update pre-commit dependencies" || ( echo "UP_TO_DATE=true" >> "$GITHUB_ENV")