Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <[email protected]>
  • Loading branch information
gaocegege committed Feb 19, 2025
1 parent 85b373a commit f2349eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/functionality-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: Deploy via helm charts
env:
DOCKER_BUILDKIT: 1
run: |
cd ${{ github.workspace }}
sudo docker build -t localhost:5000/git-act-router -f docker/Dockerfile .
Expand Down
14 changes: 10 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ FROM python:3.10-slim

WORKDIR /app

# Copy only the setup.py first to leverage Docker layer caching
# hadolint ignore=DL3008
RUN --mount=type=cache,target=/var/lib/apt --mount=type=cache,target=/var/cache/apt \
apt-get update && \
apt-get install -y --no-install-recommends git && \
rm -rf /var/lib/apt/lists/*

# Copy the setup.dot py and the git metadata first (leverage Docker layer caching)
COPY setup.py .
COPY .git/ .git/

# Copy the rest of the application code
COPY src/ src/

# Install dependencies (no cache to reduce size)
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --no-cache-dir --upgrade pip setuptools_scm && \
# Install dependencies (use cache, and delete after install, to speed up the build)
RUN pip install --upgrade --no-cache-dir pip setuptools_scm && \
pip install --no-cache-dir .

# Set the entrypoint
Expand Down

0 comments on commit f2349eb

Please sign in to comment.