Compare commits
2 Commits
165dfc8b99
...
1a2eb4d69e
Author | SHA1 | Date | |
---|---|---|---|
1a2eb4d69e
|
|||
239a085554 |
@@ -35,11 +35,11 @@ jobs:
|
|||||||
set -e # Exit immediately if a command exits with a non-zero status.
|
set -e # Exit immediately if a command exits with a non-zero status.
|
||||||
|
|
||||||
TARGET_BRANCH="origin/${{ github.base_ref }}"
|
TARGET_BRANCH="origin/${{ github.base_ref }}"
|
||||||
echo "Target branch for diff is: $TARGET_BRANCH"
|
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||||
|
|
||||||
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'clusters/**')
|
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'clusters/**')
|
||||||
|
|
||||||
echo "Found changed files:"
|
echo ">> Found changed files:"
|
||||||
echo "$CHANGED_FILES"
|
echo "$CHANGED_FILES"
|
||||||
|
|
||||||
# For each changed file, find its parent chart directory (the one with Chart.yaml).
|
# For each changed file, find its parent chart directory (the one with Chart.yaml).
|
||||||
@@ -55,16 +55,16 @@ jobs:
|
|||||||
done | sort -u)
|
done | sort -u)
|
||||||
|
|
||||||
if [[ -z "$CHANGED_CHARTS" ]]; then
|
if [[ -z "$CHANGED_CHARTS" ]]; then
|
||||||
echo "Could not determine changed charts. This could happen if only files outside a chart were changed."
|
echo ">> Could not determine changed charts. This could happen if only files outside a chart were changed."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running helm lint on changed charts:"
|
echo ">> Running helm lint on changed charts:"
|
||||||
echo "$CHANGED_CHARTS"
|
echo "$CHANGED_CHARTS"
|
||||||
|
|
||||||
echo "$CHANGED_CHARTS" | while read -r chart; do
|
echo "$CHANGED_CHARTS" | while read -r chart; do
|
||||||
echo "Building dependency for "$chart" ..."
|
echo ">> Building dependency for "$chart" ..."
|
||||||
helm dependency build "$chart"
|
helm dependency build "$chart"
|
||||||
echo "Linting $chart..."
|
echo ">> Linting $chart..."
|
||||||
helm lint "$chart"
|
helm lint "$chart"
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user