Skip to content

Update precommit-check.yml #16

Update precommit-check.yml

Update precommit-check.yml #16

name: Run pre-commit checks
on: [push, pull_request]
permissions:
contents: read
jobs:
pre-commit:
timeout-minutes: 10
runs-on: ubuntu-24.04
container:
image: kasperskydh/knp-build-image
volumes:
- ${{ github.workspace }}:/KNP
options: --cpus 1
steps:
- uses: actions/checkout@v3
- id: changed_files
uses: trilom/file-changes-action@v1.2.4
with:
output: ' '
- run: ln -s /usr/bin/python3 /usr/bin/python
shell: bash
- run: mkdir -p ~/.config/pip/
shell: bash
- run: echo -e "[global]\nbreak-system-packages = true" > ~/.config/pip/pip.conf
shell: bash
- name: Run pre-commit
run: ls -al . && pre-commit run --show-diff-on-failure --color=always --files ${{ steps.changed_files.outputs.files}}
working-directory: /KNP
shell: bash