mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 08:37:03 +02:00
ci: 🧠
This commit is contained in:
parent
2f22fc96f3
commit
9886e96d74
6 changed files with 65 additions and 3 deletions
17
.ci/pre-commit/config.yaml
Normal file
17
.ci/pre-commit/config.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# See https://pre-commit.com for more information
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.0.1
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: fix-byte-order-marker
|
||||||
|
- id: mixed-line-ending
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-case-conflict
|
||||||
|
|
||||||
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||||
|
rev: v1.1.10
|
||||||
|
hooks:
|
||||||
|
- id: remove-crlf
|
||||||
|
- id: remove-tabs
|
2
.github/workflows/charts-lint.yaml
vendored
2
.github/workflows/charts-lint.yaml
vendored
|
@ -13,7 +13,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint charts
|
name: Lint charts
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
4
.github/workflows/pr-metadata.yaml
vendored
4
.github/workflows/pr-metadata.yaml
vendored
|
@ -22,7 +22,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
pr-metadata:
|
pr-metadata:
|
||||||
name: Collect PR metadata
|
name: Collect PR metadata
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
outputs:
|
outputs:
|
||||||
isRenovatePR: ${{ startsWith(steps.branch-name.outputs.current_branch, 'renovate/') }}
|
isRenovatePR: ${{ startsWith(steps.branch-name.outputs.current_branch, 'renovate/') }}
|
||||||
isFork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
isFork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
|
|
||||||
pr-changes:
|
pr-changes:
|
||||||
name: Collect PR changes
|
name: Collect PR changes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
outputs:
|
outputs:
|
||||||
addedOrModified: ${{ steps.collect-changes.outputs.changesDetected }}
|
addedOrModified: ${{ steps.collect-changes.outputs.changesDetected }}
|
||||||
addedOrModifiedFiles: ${{ steps.collect-changes.outputs.addedOrModifiedFiles }}
|
addedOrModifiedFiles: ${{ steps.collect-changes.outputs.addedOrModifiedFiles }}
|
||||||
|
|
21
.github/workflows/pre-commit-check.yaml
vendored
Normal file
21
.github/workflows/pre-commit-check.yaml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
name: "Pre-commit consistency check"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
modifiedFiles:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pre-commit-check:
|
||||||
|
name: Run pre-commit checks
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Run against changes
|
||||||
|
uses: pre-commit/action@v3.0.0
|
||||||
|
with:
|
||||||
|
extra_args: --files ${{ inputs.modifiedFiles }} --config .ci/pre-commit/config.yaml
|
23
.taskfiles/precommit.yaml
Normal file
23
.taskfiles/precommit.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
init:
|
||||||
|
desc: Install pre-commit hooks
|
||||||
|
cmds:
|
||||||
|
- pre-commit install --install-hooks --config .ci/pre-commit/config.yaml
|
||||||
|
|
||||||
|
update:
|
||||||
|
desc: Update pre-commit hooks
|
||||||
|
cmds:
|
||||||
|
- pre-commit autoupdate --config .ci/pre-commit/config.yaml
|
||||||
|
|
||||||
|
run:
|
||||||
|
desc: Run pre-commit
|
||||||
|
cmds:
|
||||||
|
- pre-commit run --config .ci/pre-commit/config.yaml
|
||||||
|
|
||||||
|
run-all:
|
||||||
|
desc: Run pre-commit on all files
|
||||||
|
cmds:
|
||||||
|
- pre-commit run --all-files --config .ci/pre-commit/config.yaml
|
|
@ -7,6 +7,7 @@ vars:
|
||||||
|
|
||||||
includes:
|
includes:
|
||||||
charts: .taskfiles/charts.yaml
|
charts: .taskfiles/charts.yaml
|
||||||
|
precommit: .taskfiles/precommit.yaml
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue