From 6d749e92ed8d6bae50f9e2e9cda06610fb772c69 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sun, 22 Sep 2024 08:34:41 +1000 Subject: [PATCH] Add `pre-commit` hook `actionlint` Validate GitHub Actions with pre-commit. Remove the Super-Linter GitHub Actions check. It is more useful to run "actionlint" with pre-commit since the hooks run on our local machines on git commit. We also run pre-commit on GitHub. Whereas the Super-Linter tests only run on GitHub. https://github.com/rhysd/actionlint/blob/main/docs/usage.md#pre-commit --- .github/workflows/super-linter.yml | 1 - .pre-commit-config.yaml | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index f1d359434..81bed91ab 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -26,7 +26,6 @@ jobs: # VALIDATE_BASH_EXEC: true VALIDATE_DOCKERFILE_HADOLINT: true # VALIDATE_EDITORCONFIG: true - VALIDATE_GITHUB_ACTIONS: true VALIDATE_GITLEAKS: true # VALIDATE_SHELL_SHFMT: true DEFAULT_BRANCH: master diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef45c6a60..d41be2eb6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,10 @@ repos: - id: remove-tabs args: [--whitespaces-count, "2"] exclude: Makefile$ + - repo: https://github.com/rhysd/actionlint + rev: v1.7.1 + hooks: + - id: actionlint - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: