From a2b0ed3a1c1e80da023664589de8bb56d202c31a Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Fri, 23 Jun 2023 13:42:23 +0200 Subject: [PATCH 1/2] Add actionlint linter for Github Actions workflow --- .../.pre-commit-config.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 61ac275..c8b9823 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -19,7 +19,8 @@ repos: - id: check-toml # Unify file endings - id: end-of-file-fixer -{% if cookiecutter.notebooks == "Yes" %} +{%- if cookiecutter.notebooks == "Yes" %} + # Make sure that Jupyter notebooks under version control # have their outputs stripped before committing - repo: https://github.com/kynan/nbstripout @@ -27,4 +28,12 @@ repos: hooks: - id: nbstripout files: ".ipynb" -{% endif -%} +{%- endif %} +{%- if cookiecutter.github_actions_ci == "Yes" %} + + # GitHub Actions Workflow linter + - repo: https://github.com/rhysd/actionlint + rev: v1.6.25 + hooks: + - id: actionlint +{%- endif %} From 974f7813a1d53d01b9e8a86fa2bb9e2ebc9ede4d Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Fri, 23 Jun 2023 13:42:39 +0200 Subject: [PATCH 2/2] Bum pre-commit hook versions --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index c8b9823..a8324c3 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # Run Black - the uncompromising Python code formatter - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.3.0 hooks: - id: black-jupyter