Skip to content

Commit 0a189b5

Browse files
committed
fixed kustomize binary path
1 parent b304371 commit 0a189b5

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ RUN curl -LO "https://get.helm.sh/helm-v3.7.0-linux-amd64.tar.gz" && \
2020

2121
RUN apk add --no-cache git
2222

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

2729
COPY entrypoint.sh /entrypoint.sh
2830
RUN chmod +x /entrypoint.sh

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ inputs:
1010
required: true
1111
runs:
1212
using: "docker"
13-
image: "Dockerfile"
13+
image: "dhrubajyotichakraborty/kubeval-validation:1.0.2"

entrypoint.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ directory=$INPUT_DIRECTORY
88
# Validate Kubernetes manifest files
99
kubeval --strict $directory/*.yaml
1010

11-
# Validate Helm charts
12-
helm lint $directory/charts
11+
# Validate Helm charts if the 'charts' directory exists
12+
if [ -d "$directory/charts" ]; then
13+
helm lint $directory/charts
14+
fi
1315

14-
# Validate Kustomize overlays
15-
kustomize build $directory/kustomize
16+
# Validate Kustomize overlays if the 'kustomize' directory exists
17+
if [ -d "$directory/kustomize" ]; then
18+
kustomize build $directory/kustomize
19+
fi

0 commit comments

Comments
 (0)