From 7b21ae65d68ff06d6b52c880e0a6e6a5487f09cb Mon Sep 17 00:00:00 2001 From: John Franey <1728528+johnfraney@users.noreply.github.com> Date: Mon, 1 Apr 2024 21:23:00 -0300 Subject: [PATCH] Initial commit --- Dockerfile | 40 ++++++++++++++++++++++++++++++++++++++++ README.md | 15 +++++++++++++++ action.yml | 16 ++++++++++++++++ entrypoint.sh | 3 +++ 4 files changed, 74 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 action.yml create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bc182d3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +# Container image that runs your code +FROM python:3.12-bullseye + +# RUN echo "### Install dependencies" >> $GITHUB_STEP_SUMMARY + +RUN apt remove "*imagemagick*" --purge -y && apt autoremove --purge -y + +RUN apt-get -qq update && apt-get -qq install -y ffmpeg build-essential + +# RUN echo "### Build & install ImageMacick 7" >> $GITHUB_STEP_SUMMARY + +RUN git clone https://github.com/SoftCreatR/imei && \ +cd imei && \ +chmod +x imei.sh && \ +./imei.sh + + +ENV POETRY_NO_INTERACTION=1 \ + POETRY_VIRTUALENVS_IN_PROJECT=1 \ + POETRY_VIRTUALENVS_CREATE=1 \ + POETRY_CACHE_DIR=/tmp/poetry_cache + +# Copies your code file from your action repository to the filesystem path `/` of the container +COPY entrypoint.sh /entrypoint.sh +COPY pyproject.toml /pyproject.toml +COPY poetry.lock /poetry.lock + +WORKDIR / + +# RUN echo "### Install Poetry and Python dependencies" >> $GITHUB_STEP_SUMMARY + +RUN pip install poetry +RUN poetry install --no-root + +# RUN echo "### Blurring site" >> $GITHUB_STEP_SUMMARY + +WORKDIR /github/workspace + +# Code file to execute when the docker container starts up (`entrypoint.sh`) +ENTRYPOINT ["/entrypoint.sh"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..534a2ab --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Setup Blurry Docker action + +This action builds your [Blurry](https://github.com/blurry-dev/blurry) static site. + +## Inputs + +None yet + +## Outputs + +Your built site + +## Example usage + +uses: blurry-dev/setup-blurry@v0.1 diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..96ffc1d --- /dev/null +++ b/action.yml @@ -0,0 +1,16 @@ +# action.yml +name: 'Setup Blurry' +description: 'Builds a static site using Blurry' +# inputs: +# who-to-greet: # id of input +# description: 'Who to greet' +# required: true +# default: 'World' +# outputs: +# time: # id of output +# description: 'The time we greeted you' +runs: + using: 'docker' + image: 'Dockerfile' + # args: + # - ${{ inputs.who-to-greet }} diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..b3fdc54 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh -l + +poetry run blurry build \ No newline at end of file