promising solution using volume mount
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
@@ -18,15 +18,7 @@ jobs:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- 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
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
|
||||
+5
-5
@@ -8,11 +8,11 @@ WORKDIR /code/
|
||||
COPY requirements.txt ./
|
||||
|
||||
|
||||
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip install --upgrade pip
|
||||
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip list --outdated
|
||||
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip install --upgrade wheel
|
||||
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip install --upgrade setuptools
|
||||
RUN --mount=type=cache,target=/opt/hostedtoolcache/pip pip install -r requirements.txt
|
||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
|
||||
RUN pip list --cache-dir=/opt/hostedtoolcache/pip --outdated
|
||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade wheel
|
||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade setuptools
|
||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip -r requirements.txt
|
||||
|
||||
# Copy the rest of your application code (Changes frequently, invalidates subsequent cache)
|
||||
COPY . ./
|
||||
|
||||
Reference in New Issue
Block a user