mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 23:49:12 +00:00
a98f42b657
Co-authored-by: Renovate Bot <bot@renovateapp.com>
39 lines
1023 B
YAML
39 lines
1023 B
YAML
name: "Pre-commit consistency check"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
|
|
jobs:
|
|
pre-commit-check:
|
|
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
|
|
name: Run pre-commit checks
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: dorny/paths-filter@v2
|
|
id: filter
|
|
with:
|
|
list-files: shell
|
|
filters: |
|
|
addedOrModified:
|
|
- added|modified: '**'
|
|
|
|
# run only if changed files were detected
|
|
- name: Run against changes
|
|
uses: pre-commit/action@v2.0.3
|
|
if: steps.filter.outputs.addedOrModified == 'true'
|
|
with:
|
|
extra_args: --files ${{ steps.filter.outputs.addedOrModified_files }}
|
|
|
|
# run if no changed files were detected (e.g. workflow_dispatch on master branch)
|
|
- name: Run against all files
|
|
uses: pre-commit/action@v2.0.3
|
|
if: steps.filter.outputs.addedOrModified != 'true'
|
|
with:
|
|
extra_args: --all-files
|