Skip to content

Commit e2876ae

Browse files
fix(psa-checker): handle dependent charts (#84)
2 parents 366371f + a45921f commit e2876ae

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/psa-checker.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ jobs:
6363
PSS_LEVEL: ${{ inputs.pss_level }}
6464
CHART_DIR: ${{ matrix.chart }}
6565
run: |
66-
# Loop over each `values-*` dir and check PSS levels
66+
# Loop over templates from each `values-*` dir and check PSS levels
6767
docker pull $PSA_CHECKER_IMAGE:$PSA_CHECKER_SHA # Pull before run so the output is less messy
68-
CHART_NAME=$(echo "$CHART_DIR" | cut -d'/' -f3)
6968
cd "shared/charts/$CHART_DIR/"
7069
for ENV_DIR in */; do
71-
echo -e "\nChecking $ENV_DIR for chart: $CHART_NAME"
72-
cd "$(find $ENV_DIR -type d -name 'templates')"
73-
cat *.yaml | docker run -i $PSA_CHECKER_IMAGE:$PSA_CHECKER_SHA --level "$PSS_LEVEL" -f -
74-
cd -
70+
# If there are dependencies, loop over all of them
71+
for CHART in $(find $ENV_DIR -type d -name 'templates'); do
72+
echo -e "\nRunning psa-checker for chart: $CHART"
73+
cd $CHART
74+
cat *.yaml | docker run -i $PSA_CHECKER_IMAGE:$PSA_CHECKER_SHA --level "$PSS_LEVEL" -f -
75+
cd -
76+
done
7577
done

0 commit comments

Comments
 (0)