diff --git a/.github/workflows/python-lint-and-test.yml b/.github/workflows/python-lint-and-test.yml index 6226342..e2287e9 100644 --- a/.github/workflows/python-lint-and-test.yml +++ b/.github/workflows/python-lint-and-test.yml @@ -60,4 +60,5 @@ jobs: -e INPUT_INCLUDE_URL_CONTAINED='ScholliYT/Broken-Links-Crawler-Action' \ -e INPUT_EXCLUDE_URL_CONTAINED='/tree' \ -e INPUT_EXCLUDE_URL_PREFIX="mailto:,https://www.linkedin.com,https://linkedin.com" \ + -e INPUT_EXCLUDE_URL_SUFFIX=".zip" \ ${{ env.CI_DOCKER_LABEL }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 3bb09b3..df2e3a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,18 @@ # Container image that runs your code +# based on: +# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/ FROM python:3.8-slim-buster -# We copy just the requirements.txt first to leverage Docker cache -COPY ./requirements.txt /app/requirements.txt - -WORKDIR /app +ENV VIRTUAL_ENV=/opt/venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" -RUN pip3 install -r requirements.txt +# We copy just the requirements.txt first to leverage Docker cache +COPY ./requirements.txt . +RUN python -m pip install --upgrade pip && pip install -r requirements.txt # Copies your code file from your action repository to the filesystem path `/` of the container -COPY deadseeker /app/deadseeker/ +COPY deadseeker ./deadseeker # Code file to execute when the docker container starts up (`deadseeker.py`) CMD [ "python", "-m", "deadseeker.action" ]