37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
---
|
|
name: Workflow for Linting with pre-commit
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
pre-commit-command:
|
|
description: Command to run pre-commit
|
|
required: false
|
|
type: string
|
|
default: "pre-commit run --all-files"
|
|
pre-commit-version:
|
|
description: Version of pre-commit to install
|
|
required: false
|
|
type: string
|
|
default: "4.*"
|
|
python-version:
|
|
description: Version of python to install
|
|
required: false
|
|
type: string
|
|
default: "3.14"
|
|
permissions: {}
|
|
jobs:
|
|
docker-build-and-push:
|
|
name: Lint with pre-commit
|
|
runs-on: ubuntu-latest-test
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://github.com/actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: https://github.com/actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
with:
|
|
python-version: ${{ inputs.python-version }}
|
|
check-latest: true
|
|
- name: Run pre-commit
|
|
uses: https://github.com/pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
|
|
with:
|
|
pre-commit-version: ${{ inputs.pre-commit-version }}
|
|
pre-commit-command: ${{ inputs.pre-commit-command }}
|