From 7be19ef101e9b99aecf964b69a704cc4fe752533 Mon Sep 17 00:00:00 2001 From: Yaraslau Zhylko Date: Fri, 15 Oct 2021 12:51:53 +0300 Subject: [PATCH] feat: run the hook only if CircleCI config file is changed (#3) --- .pre-commit-hooks.yaml | 4 +++- README.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3586013..43d866f 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -2,4 +2,6 @@ name: Validate CircleCI config description: This hook validate CircleCI config entry: circleci_validate.sh - language: script \ No newline at end of file + language: script + files: .circleci/config.yml + pass_filenames: false diff --git a/README.md b/README.md index 8e432ef..c31c1df 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ```bash $ cat .pre-commit-config.yaml - repo: https://github.com/zahorniak/pre-commit-circleci.git - rev: v0.2 # Ensure this is the latest tag, comparing to the Releases tab + rev: v0.3 # Ensure this is the latest tag, comparing to the Releases tab hooks: - id: circleci_validate ```