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

Use local Dockerfile #1

Closed
wants to merge 10 commits into from
Closed
21 changes: 16 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
FROM python:3
FROM python:3.10

COPY post_updater.py /bin/post_updater
COPY requirements.txt /tmp/requirements.txt
RUN chmod +x /bin/post_updater && pip install -r /tmp/requirements.txt
# Set Poetry Version
ENV POETRY_VERSION=1.1.13
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 - --version $POETRY_VERSION
# Add poetry install location to PATH
ENV PATH=/root/.local/bin:$PATH

CMD ["/bin/post_updater"]
RUN poetry config virtualenvs.create false
COPY poetry.lock pyproject.toml ./
RUN poetry install --no-root --no-dev

COPY post_updater.py /bin/post_updater.py

RUN chmod +x /bin/post_updater.py

CMD ["post_updater.py"]
15 changes: 12 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@ inputs:
description: Discord Bot Token for Authentication
required: true
post_file:
description: Path to the file containing the post
required: true
description: Path to the file containing the raw post
required: false
post_xml:
description: Path to the file containing the XML specification for the post
required: false
discord_channel:
description: Discord Channel ID
required: true
discord_message:
description: Existing message ID to update (must be owned by the bot user)
required: false
use_embed:
description: Whether to use an embed (title extracted from top line heading in file) or a regular message. Defaults to regular.
required: false
embed_color:
description: Decimal color for the embed if using an embed. Defaults to 0.
required: false
runs:
using: docker
image: hreeder/discord-post-updater
image: Dockerfile
branding:
icon: edit
color: purple
207 changes: 207 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading