mirror of
https://github.com/Balshgit/python-poetry.git
synced 2025-09-11 21:50:40 +03:00
add files check to Dockerfile
This commit is contained in:
parent
96bd888727
commit
ee2b685ad9
5
.github/workflows/poetry-test.yml
vendored
5
.github/workflows/poetry-test.yml
vendored
@ -80,11 +80,6 @@ jobs:
|
|||||||
POETRY_LOCK: "./poetry/poetry.lock"
|
POETRY_LOCK: "./poetry/poetry.lock"
|
||||||
REQUIREMENTS: "./poetry/requirements.txt"
|
REQUIREMENTS: "./poetry/requirements.txt"
|
||||||
run: |
|
run: |
|
||||||
chown -R ${USER}:${USER} ./poetry
|
|
||||||
cp pyproject.toml ./poetry
|
cp pyproject.toml ./poetry
|
||||||
docker compose up --build
|
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
|
shell: bash
|
@ -48,6 +48,11 @@ RUN export PATH="${PATH}:/root/.local/bin" \
|
|||||||
&& poetry lock \
|
&& poetry lock \
|
||||||
&& poetry export -f requirements.txt --with dev --without-hashes --output requirements.txt
|
&& 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" ]
|
CMD [ "/bin/bash", "-c", "cp /code/* /poetry -r && chown ${USER}:$USER -R /poetry" ]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user