Skip to content

Commit 9c1582d

Browse files
authored
fix workflow error
1 parent 108236b commit 9c1582d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/docker-image.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
echo "$CHANGED"
4040
4141
declare -A MAP=(
42-
["hmi"]="hmi/"
4342
["plc"]="plc/"
4443
["router"]="router/"
4544
["workstation"]="workstation/"
@@ -92,6 +91,10 @@ jobs:
9291
SERVICES=$(echo '${{ needs.detect-changes.outputs.services }}' | jq -r '.[]')
9392
set -euo pipefail
9493
for SERVICE in $SERVICES; do
94+
if [ ! -d "./${SERVICE}" ]; then
95+
echo "⚠️ Skipping ${SERVICE}: directory does not exist"
96+
continue
97+
fi
9598
IMAGE="${{ secrets.DOCKERHUB_USERNAME }}/grfics-${SERVICE}"
9699
echo "🚀 Building ${IMAGE}:${DOCKER_TAG} (amd64)"
97100
docker buildx build \
@@ -129,6 +132,10 @@ jobs:
129132
SERVICES=$(echo '${{ needs.detect-changes.outputs.services }}' | jq -r '.[]')
130133
set -euo pipefail
131134
for SERVICE in $SERVICES; do
135+
if [ ! -d "./${SERVICE}" ]; then
136+
echo "⚠️ Skipping ${SERVICE}: directory does not exist"
137+
continue
138+
fi
132139
IMAGE="${{ secrets.DOCKERHUB_USERNAME }}/grfics-${SERVICE}"
133140
echo "🚀 Building ${IMAGE}:${DOCKER_TAG} (arm64)"
134141
docker buildx build \

0 commit comments

Comments
 (0)