promising solution using volume mount
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Pierre Geeraert
2025-12-05 10:24:44 +00:00
parent e08016c103
commit ad82f73c1d
2 changed files with 6 additions and 14 deletions
+1 -9
View File
@@ -18,15 +18,7 @@ jobs:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4 uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- name: List files in the repository
run: |
ls /opt/hostedtoolcache
- name: List files in the repository
run: |
touch /opt/hostedtoolcache/hello.txt
- name: List files in the repository
run: |
ls /opt/hostedtoolcache
- name: List files in the repository - name: List files in the repository
run: | run: |
ls ${{ gitea.workspace }} ls ${{ gitea.workspace }}
+5 -5
View File
@@ -8,11 +8,11 @@ WORKDIR /code/
COPY requirements.txt ./ COPY requirements.txt ./
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip install --upgrade pip RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip list --outdated RUN pip list --cache-dir=/opt/hostedtoolcache/pip --outdated
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip install --upgrade wheel RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade wheel
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip install --upgrade setuptools RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade setuptools
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip install -r requirements.txt RUN pip install --cache-dir=/opt/hostedtoolcache/pip -r requirements.txt
# Copy the rest of your application code (Changes frequently, invalidates subsequent cache) # Copy the rest of your application code (Changes frequently, invalidates subsequent cache)
COPY . ./ COPY . ./