Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ RUN curl -LO "https://get.helm.sh/helm-v3.7.0-linux-amd64.tar.gz" && \

RUN apk add --no-cache git

RUN curl -LO "https://github.com/kubernetes-sigs/kustomize/releases/latest/download/kustomize_linux_amd64" && \
chmod +x kustomize_linux_amd64 && \
mv kustomize_linux_amd64 /usr/local/bin/kustomize
RUN curl -LO "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.4.0/kustomize_v4.4.0_linux_amd64.tar.gz" && \
tar xf kustomize_v4.4.0_linux_amd64.tar.gz && \
rm kustomize_v4.4.0_linux_amd64.tar.gz && \
mv kustomize /usr/local/bin/kustomize


COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ inputs:
required: true
runs:
using: "docker"
image: "Dockerfile"
image: "dhrubajyotichakraborty/kubeval-validation:1.0.2"
12 changes: 8 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ directory=$INPUT_DIRECTORY
# Validate Kubernetes manifest files
kubeval --strict $directory/*.yaml

# Validate Helm charts
helm lint $directory/charts
# Validate Helm charts if the 'charts' directory exists
if [ -d "$directory/charts" ]; then
helm lint $directory/charts
fi

# Validate Kustomize overlays
kustomize build $directory/kustomize
# Validate Kustomize overlays if the 'kustomize' directory exists
if [ -d "$directory/kustomize" ]; then
kustomize build $directory/kustomize
fi