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
|
- 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
@@ -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 . ./
|
||||||
|
|||||||
Reference in New Issue
Block a user