Skip to content

Commit

Permalink
style(ci): cleanup finish
Browse files Browse the repository at this point in the history
  • Loading branch information
naviat committed Apr 19, 2024
1 parent 5be56cf commit 348166a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/helm-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Helm Lint

on:
Expand Down Expand Up @@ -25,18 +26,18 @@ jobs:
sudo apt update
sudo apt install -y git unzip
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
uses: azure/setup-helm@main
with:
version: v3.10.1

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@8238a4103220c636f2dad328ead8a7c8dbe316a3 # v39.2.0
uses: tj-actions/changed-files@main
with:
files: |
apps/**
Expand All @@ -54,18 +55,17 @@ jobs:
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
chart=$(echo $file | cut -d/ -f 1-2)
values_dir="$chart/values"
# Check and lint values in the 'values' directories
if [[ -d "$values_dir" ]]; then
for value_file in $(find "$values_dir" -type f); do
echo "helm lint $chart -f $value_file"
helm lint "$chart" -f "$value_file"
done
fi
# Fallback to lint the chart without specific value files if none of the directories exist
# Fallback to lint the chart without specific value
# files if none of the directories exist
if [[ ! -d "$values_dir" ]]; then
helm lint "$chart"
fi
done
shell: bash
7 changes: 4 additions & 3 deletions .github/workflows/json-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: JSON Lint

on:
Expand All @@ -19,18 +20,18 @@ jobs:
contents: write
steps:

- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@8238a4103220c636f2dad328ead8a7c8dbe316a3 # v39.2.0
uses: tj-actions/changed-files@main
with:
files: |
apps/**/values/**
- name: JSON lint
uses: dungpham91/lint-json-inside-yaml@ee76a68fafcf4b959e711e24d11d9c4f33137e80 # v0.0.2
uses: dungpham91/lint-json-inside-yaml@main
with:
folder_or_file: ${{ steps.changed-files.outputs.all_changed_files }}
4 changes: 2 additions & 2 deletions .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
sudo apt install -y git
sudo apt install -y yamllint
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@8238a4103220c636f2dad328ead8a7c8dbe316a3
uses: tj-actions/changed-files@main
with:
files: |
.github/**
Expand Down

0 comments on commit 348166a

Please sign in to comment.