Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds dockerfile #8

Merged
merged 5 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ ENABLE_LINTERS:
- MARKDOWN_MARKDOWNLINT
- MAKEFILE_CHECKMAKE

MAKEFILE_CHECKMAKE_DISABLE_ERRORS: true
DISABLE_ERRORS_LINTERS:
- MAKEFILE_CHECKMAKE
- REPOSITORY_KICS
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM registry.access.redhat.com/ubi8/python-38:1

ENV POETRY_NO_INTERACTION=1

COPY ./ /trestle-bot

WORKDIR /trestle-bot

USER root

# Install dependencies
RUN python3.8 -m pip install --no-cache-dir --upgrade pipx \
&& pipx install poetry==1.5.1 \
&& poetry config virtualenvs.create false \
&& poetry install --without tests,dev
jpower432 marked this conversation as resolved.
Show resolved Hide resolved

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

USER 1001

ENTRYPOINT poetry run trestle-bot \
jpower432 marked this conversation as resolved.
Show resolved Hide resolved
--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}"
15 changes: 13 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,19 @@ inputs:

runs:
using: "docker"
image: "REPLACE_ME"

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"