Skip to content

Commit

Permalink
Update docker-build-push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
leezhuuuuu authored Oct 15, 2024
1 parent 877d6ab commit a6ea74d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
id: generate_dockerfile
run: |
dependencies=$(yq e '.dependencies[]' config.yaml | tr '\n' ' ')
if [ -z "$dependencies" ]; then
echo "No dependencies found in config.yaml"
exit 1
fi
cat > Dockerfile <<EOL
FROM python:3.10-slim
Expand All @@ -49,7 +53,7 @@ jobs:
&& apt-get clean \\
&& pip install --no-cache-dir --upgrade pip \\
&& pip install --no-cache-dir cython \\
&& pip install --no-cache-dir ${dependencies}
&& pip install --no-cache-dir $dependencies
COPY . .
Expand Down

0 comments on commit a6ea74d

Please sign in to comment.