diff --git a/.github/workflows/poetry-test.yml b/.github/workflows/poetry-test.yml index 9f7eb22..dc429a3 100644 --- a/.github/workflows/poetry-test.yml +++ b/.github/workflows/poetry-test.yml @@ -80,11 +80,6 @@ jobs: POETRY_LOCK: "./poetry/poetry.lock" REQUIREMENTS: "./poetry/requirements.txt" run: | - chown -R ${USER}:${USER} ./poetry cp pyproject.toml ./poetry docker compose up --build - if [ -f "$POETRY_LOCK" ] && [ -f "$REQUIREMENTS" ]; \ - then echo "poetry.lock and requirements.txt created successfully" && exit 0; \ - else echo "there is no poetry.lock or requirements.txt" && exit 1; \ - fi shell: bash \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6c1baf0..ce6a69e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,6 +48,11 @@ RUN export PATH="${PATH}:/root/.local/bin" \ && poetry lock \ && poetry export -f requirements.txt --with dev --without-hashes --output requirements.txt +RUN if [ -f poetry.lock ] && [ -f requirements.txt ]; then \ + echo "poetry.lock and requirements.txt created successfully" && exit 0; \ + else echo "there is no poetry.lock or requirements.txt" && exit 1; \ + fi + CMD [ "/bin/bash", "-c", "cp /code/* /poetry -r && chown ${USER}:$USER -R /poetry" ]