diff --git a/.github/workflows/test-code-embedder.yml b/.github/workflows/test-code-embedder.yml index 3229ad4..2d28a10 100644 --- a/.github/workflows/test-code-embedder.yml +++ b/.github/workflows/test-code-embedder.yml @@ -10,6 +10,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Code Embedder uses: ./ env: diff --git a/Dockerfile b/Dockerfile index 88ec8e9..78fefa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,20 @@ -FROM alpine:3.10 +FROM python:3.11-slim ENV GITHUB_TOKEN=${GITHUB_TOKEN} ENV GITHUB_REPOSITORY=${GITHUB_REPOSITORY} ENV GITHUB_SHA=${GITHUB_SHA} -COPY main.py /app/main.py +WORKDIR /app -ENTRYPOINT ["python3", "/app/main.py"] \ No newline at end of file +RUN apt-get update \ + && pip install poetry==1.8.4 + +RUN poetry config virtualenvs.create false + +COPY . /app/ + +ENV PATH="$POETRY_HOME/bin:$PATH" + +RUN poetry install + +ENTRYPOINT ["poetry", "run", "python", "/app/main.py"] \ No newline at end of file diff --git a/README.md b/README.md index 36da760..e2632d9 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,12 @@ ## Script example 1 ```python:examples/example.py -import os - -print("Code to embed") ``` Meow meow ## Script example 2 ```python:examples/example.py -import os - -print("Code to embed") ``` ### Viu viu diff --git a/action.yml b/action.yml index 84f87ed..d80dbc7 100644 --- a/action.yml +++ b/action.yml @@ -14,4 +14,4 @@ runs: using: docker image: Dockerfile args: - - ${{ inputs.readme_path }} \ No newline at end of file + - ${{ inputs.readme_path || 'README.md' }}