Skip to content

build(deps): bump the development-dependencies group across 1 directory with 8 updates #73

build(deps): bump the development-dependencies group across 1 directory with 8 updates

build(deps): bump the development-dependencies group across 1 directory with 8 updates #73

Workflow file for this run

name: Linters
on:
pull_request:
jobs:
commitizen:
uses: janw/workflows/.github/workflows/commitizen.yaml@main
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
- name: Install poetry
run: pipx install poetry
- name: Set up python environment
uses: actions/setup-python@v5
id: setup-python
with:
cache: poetry
python-version: 3.x
- name: Install dependencies
run: poetry install --no-root --sync
- id: cache-restore
uses: actions/cache/restore@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-v0|${{ steps.setup-python.outputs.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }}
- id: pre-commit
shell: bash
run: |
set +e
set -o pipefail
echo -e '### Pre-commit results 🤖\n```plain' > pre-commit.log
poetry run pre-commit run --show-diff-on-failure --color=never --all-files \
| tee -a pre-commit.log
result=$?
echo -e '```' >> pre-commit.log
exit $result
- id: cache-save
uses: actions/cache/save@v4
if: always() && steps.cache-restore.outputs.cache-hit != 'true'
with:
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
path: ~/.cache/pre-commit
- name: Create results comment
uses: thollander/actions-comment-pull-request@v3
if: always()
with:
file-path: pre-commit.log
mode: recreate
github-token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
comment-tag: pre_commit_results
- uses: stefanzweifel/git-auto-commit-action@v5
if: always() && github.actor != 'janw-bot'
with:
commit_message: "build(lint): Auto-fix linting issues"
commit_user_name: "Jan Willhaus [bot]"
commit_user_email: "bot@janw.xyz"
commit_author: Jan Willhaus [bot] <bot@janw.xyz>
add_options: '-u'