Skip to content

Commit

Permalink
Merge pull request #1970 from consideRatio/pr/pre-commit-chartpress
Browse files Browse the repository at this point in the history
pre-commit: chartpress --reset on Chart.yaml/values.yaml changes
  • Loading branch information
consideRatio authored Jan 1, 2021
2 parents e6aeff6 + 3c17834 commit b3074a5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
with:
python-version: '3.7'

- uses: pre-commit/action@v2.0.0

- name: Install dependencies
run: |
. ci/common
setup_helm
KUBEVAL_VERSION=0.15.0 setup_kubeval
pip install yamllint
pip install chartpress yamllint
- uses: pre-commit/action@v2.0.0

- name: Lint and validate
# NOTE: Kubernetes resource validation can only be done against
Expand Down
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
# pre-commit is a tool to automatically do tasks before committing.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
repos:
# Python code formatting
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args: [--target-version=py36]

# Shell script code formatting
- repo: https://github.com/lovesegfault/beautysh
rev: 6.0.1
hooks:
- id: beautysh

# Reset changes by chartpress
- repo: local
hooks:
- id: chartpress
name: chartpress --reset
files: jupyterhub/Chart.yaml|jupyterhub/values.yaml
description: Run `chartpress --reset` to clean up helm charts before committing.
entry: chartpress --reset
language: system
pass_filenames: false

0 comments on commit b3074a5

Please sign in to comment.