Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hreeder/discord-post-updater
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: compsoc-edinburgh/discord-post-updater
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 10 commits
  • 7 files changed
  • 2 contributors

Commits on Nov 17, 2020

  1. Use local Dockerfile

    penalosa authored Nov 17, 2020
    Copy the full SHA
    d99d1d2 View commit details

Commits on Jul 2, 2022

  1. Copy the full SHA
    e9fbc4b View commit details
  2. Copy the full SHA
    61066f9 View commit details
  3. Copy the full SHA
    6d3f553 View commit details
  4. Copy the full SHA
    b8b3898 View commit details
  5. Copy the full SHA
    df0e91e View commit details
  6. Copy the full SHA
    42a23ec View commit details

Commits on Jul 3, 2022

  1. Copy the full SHA
    82d6f6a View commit details

Commits on Aug 14, 2022

  1. Copy the full SHA
    b1ebbc3 View commit details

Commits on Nov 14, 2023

  1. Copy the full SHA
    519768d View commit details
Showing with 438 additions and 16 deletions.
  1. +16 −5 Dockerfile
  2. +12 −3 action.yml
  3. +207 −0 poetry.lock
  4. +101 −7 post_updater.py
  5. +16 −0 pyproject.toml
  6. +0 −1 requirements.txt
  7. +86 −0 schema.xsd
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
@@ -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