-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (37 loc) · 1.03 KB
/
linter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Lint Code Base
"on":
- pull_request
jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest
env:
CT_TARGET_BRANCH: ${{ github.event.repository.default_branch }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install yq
run: |
sudo snap install yq
- name: Extract helm repos
id: helm-repos
run: |
echo -n "::set-output name=repos::"
for DIR in ./charts/*; do
FILE="$DIR/Chart.yaml"
DIR="${DIR//\./}"
yq e '.dependencies.[].repository' "$FILE"
done | sort -u | awk '{printf (NR>1 ? "," : "") NR "=" $1}'
echo
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: Lint charts
run: ct lint
env:
CT_CHART_REPOS: ${{ steps.helm-repos.outputs.repos }}