Skip to content

Commit ad49a30

Browse files
Update build.yml - libmagic for special workers
1 parent 57dde64 commit ad49a30

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
command_value="${{ env.COMMAND }}"
146146
147147
# Add multiple workers separated by spaces
148-
#special_alpine_workers="PaloAltoNGFW Worker2 Worker3 AnotherWorker"
148+
special_alpine_workers="PaloAltoNGFW Worker2 Worker3 AnotherWorker"
149149
150150
if [ ! -f "$dockerfile_path" ]; then
151151
echo "Dockerfile not found in $dockerfile_path. Creating one..."
@@ -155,9 +155,10 @@ jobs:
155155
# echo "RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*" >> "$dockerfile_path"
156156
157157
# Check if current worker is among special alpine workers
158-
#if echo "$special_alpine_workers" | grep -qw "$matrix_directory"; then
158+
if echo "$special_alpine_workers" | grep -qw "$matrix_directory"; then
159159
# echo "RUN apk add --no-cache file-dev && rm -rf /var/cache/apk/*" >> "$dockerfile_path"
160-
#fi
160+
echo "RUN apt-get update && apt-get install -y --no-install-recommends libmagic1 && rm -rf /var/lib/apt/lists/*" >> "$dockerfile_path"
161+
fi
161162
162163
echo "WORKDIR /worker" >> "$dockerfile_path"
163164
echo "COPY requirements.txt ${matrix_directory}/" >> "$dockerfile_path"
@@ -565,7 +566,7 @@ jobs:
565566
command_value="${{ env.COMMAND }}"
566567
567568
# Add multiple workers separated by spaces
568-
# special_alpine_workers="PaloAltoNGFW Worker2 Worker3 AnotherWorker"
569+
special_alpine_workers="PaloAltoNGFW Worker2 Worker3 AnotherWorker"
569570
570571
if [ ! -f "$dockerfile_path" ]; then
571572
echo "Dockerfile not found in $dockerfile_path. Creating one..."
@@ -574,9 +575,10 @@ jobs:
574575
echo "FROM python:3-slim" > "$dockerfile_path"
575576
576577
# Check if current worker is among special alpine workers
577-
#if echo "$special_alpine_workers" | grep -qw "$matrix_directory"; then
578+
if echo "$special_alpine_workers" | grep -qw "$matrix_directory"; then
578579
# echo "RUN apk add --no-cache file-dev && rm -rf /var/cache/apk/*" >> "$dockerfile_path"
579-
#fi
580+
echo "RUN apt-get update && apt-get install -y --no-install-recommends libmagic1 && rm -rf /var/lib/apt/lists/*" >> "$dockerfile_path"
581+
fi
580582
581583
echo "WORKDIR /worker" >> "$dockerfile_path"
582584
echo "COPY requirements.txt ${matrix_directory}/" >> "$dockerfile_path"

0 commit comments

Comments
 (0)