diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a35eba80..f51d6c24 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,9 +9,10 @@ repos: - .github/lint/.yamllint.yaml id: yamllint - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.1.0 hooks: - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] - id: end-of-file-fixer - id: mixed-line-ending - repo: https://github.com/Lucas-C/pre-commit-hooks @@ -24,6 +25,6 @@ repos: hooks: - id: fix-smartquotes - repo: https://github.com/k8s-at-home/sops-pre-commit - rev: v2.0.3 + rev: v2.1.0 hooks: - id: forbid-secrets diff --git a/.taskfiles/pre-commit.yml b/.taskfiles/pre-commit.yml index ecf06276..22d53b15 100644 --- a/.taskfiles/pre-commit.yml +++ b/.taskfiles/pre-commit.yml @@ -5,7 +5,7 @@ tasks: init: desc: Initialize pre-commit hooks cmds: - - pre-commit install-hooks + - pre-commit install --install-hooks run: desc: Run pre-commit cmds: diff --git a/README.md b/README.md index 20ee1d6d..c7bdd7c6 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,19 @@ It is advisable to install [pre-commit](https://pre-commit.com/) and the pre-com After pre-commit is installed on your machine run: ```sh -pre-commit install-hooks +task pre-commit:init +``` +**Remember to run this on each new clone of the repository for it to have effect.** + +Commands are of interest, for learning purposes: + +This command makes it so pre-commit runs on `git commit`, and also installs environments per the config file. +``` +pre-commit install --install-hooks +``` +This command checks for new versions of hooks, though it will occasionally make mistakes, so verify its results. +``` +pre-commit autoupdate ``` ## :open_file_folder:  Repository structure @@ -194,7 +206,7 @@ In order to use Terraform and `cert-manager` with the Cloudflare DNS challenge y 4. If everything goes as planned you should see Ansible running the k3s install Playbook against your nodes. 5. Verify the nodes are online - + ```sh kubectl --kubeconfig=./provision/kubeconfig get nodes # NAME STATUS ROLES AGE VERSION