Skip to content

Commit

Permalink
poetry working
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Flom <[email protected]>
  • Loading branch information
afflom committed Jun 27, 2023
1 parent 6b9a22b commit 93f92ee
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
27 changes: 23 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,28 @@ COPY ./ /trestle-bot

WORKDIR /trestle-bot

USER root

# Install dependencies
RUN python3.8 -m pip install --upgrade pip \
&& pip install poetry \
&& poetry install
RUN python3.8 -m pip install --upgrade pipx \
&& pipx install poetry==1.5.1 \
&& poetry config virtualenvs.create false \
&& poetry install --without tests,dev

RUN chown -HR 1001:1001 /trestle-bot \
chown -HR 1001:1001 /opt/app-root/src/

USER 1001
ENTRYPOINT [ "poetry", "run", "trestle-bot" ]

ENTRYPOINT poetry run trestle-bot \
--markdown-path="${MARKDOWN_PATH}" \
--assemble-model="${ASSEMBLE_MODEL}" \
--ssp-index-path="${SSP_INDEX_PATH}" \
--commit-message="${COMMIT_MESSAGE}" \
--branch="${BRANCH}" \
--patterns="${PATTERNS}" \
--committer-name="${COMMIT_USER_NAME}" \
--committer-email="${COMMIT_USER_EMAIL}" \
--author-name="${AUTHOR_NAME}" \
--author-email="${AUTHOR_EMAIL}" \
--working-dir="${WORKING_DIR}"
13 changes: 12 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,18 @@ inputs:
runs:
using: "docker"
image: "Dockerfile"

env:
MARKDOWN_PATH: ${{ inputs.markdown_path }}
ASSEMBLE_MODEL: ${{ inputs.assemble_model }}
SSP_INDEX_PATH: ${{ inputs.ssp_index_path }}
COMMIT_MESSAGE: ${{ inputs.commit_message }}
BRANCH: ${{ inputs.branch }}
PATTERNS: ${{ inputs.file_pattern }}
COMMIT_USER_NAME: ${{ inputs.commit_user_name }}
COMMIT_USER_EMAIL: ${{ inputs.commit_user_email }}
COMMIT_AUTHOR_NAME: ${{ inputs.commit_author_name }}
COMMIT_AUTHOR_EMAIL: ${{ inputs.commit_author_email }}
REPOSITORY: ${{ inputs.repository }}
branding:
icon: "check"
color: "green"

0 comments on commit 93f92ee

Please sign in to comment.