commit 1bd43fe68de7510c18b35806b0467d2ca18613bf
parent 60cacea62c6b9189a723d4cf8032ad1e635c2c6b
Author: MTRNord <MTRNord@users.noreply.github.com>
Date: Wed, 25 Mar 2026 22:32:35 +0100
fix bookwyrm
Signed-off-by: MTRNord <MTRNord@users.noreply.github.com>
Diffstat:
2 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/build-bookwyrm.yaml b/.github/workflows/build-bookwyrm.yaml
@@ -5,6 +5,7 @@ on:
branches: ["main"]
paths:
- ".github/workflows/build-bookwyrm.yaml"
+ - "apps/talos_cluster/bookwyrm/dockerfile.patch"
schedule:
# Check for new upstream releases daily at 04:00 UTC
- cron: "0 4 * * *"
@@ -13,6 +14,10 @@ on:
version:
description: "Bookwyrm version to build (e.g. v0.8.3). Leave empty to use latest upstream release."
required: false
+ force:
+ description: "Force rebuild even if tag already exists in registry"
+ required: false
+ default: "false"
permissions:
contents: read
@@ -30,6 +35,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
INPUT_VERSION: ${{ inputs.version }}
+ INPUT_FORCE: ${{ inputs.force }}
run: |
if [ -n "$INPUT_VERSION" ]; then
NEW="$INPUT_VERSION"
@@ -38,15 +44,20 @@ jobs:
fi
echo "new_version=$NEW" >> "$GITHUB_OUTPUT"
- # Check if this tag already exists in the registry (anonymous read)
- TAGS=$(curl -sf "https://registry.midnightthoughts.space/v2/mtrnord/bookwyrm/tags/list" \
- | grep -o '"tags":\[[^]]*\]' || echo "")
- if echo "$TAGS" | grep -q "\"${NEW}\""; then
- echo "needs_build=false" >> "$GITHUB_OUTPUT"
- echo "Tag ${NEW} already exists in registry, skipping build"
- else
+ if [ "$INPUT_FORCE" = "true" ]; then
echo "needs_build=true" >> "$GITHUB_OUTPUT"
- echo "Tag ${NEW} not found in registry, will build"
+ echo "Force rebuild requested for tag ${NEW}"
+ else
+ # Check if this tag already exists in the registry (anonymous read)
+ TAGS=$(curl -sf "https://registry.midnightthoughts.space/v2/mtrnord/bookwyrm/tags/list" \
+ | grep -o '"tags":\[[^]]*\]' || echo "")
+ if echo "$TAGS" | grep -q "\"${NEW}\""; then
+ echo "needs_build=false" >> "$GITHUB_OUTPUT"
+ echo "Tag ${NEW} already exists in registry, skipping build"
+ else
+ echo "needs_build=true" >> "$GITHUB_OUTPUT"
+ echo "Tag ${NEW} not found in registry, will build"
+ fi
fi
build:
@@ -63,6 +74,15 @@ jobs:
ref: ${{ needs.check.outputs.new_version }}
persist-credentials: false
+ - name: Checkout gitops for Dockerfile patch
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ path: _gitops
+ persist-credentials: false
+
+ - name: Apply Dockerfile patch
+ run: git apply _gitops/apps/talos_cluster/bookwyrm/dockerfile.patch
+
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
diff --git a/apps/talos_cluster/bookwyrm/dockerfile.patch b/apps/talos_cluster/bookwyrm/dockerfile.patch
@@ -0,0 +1,15 @@
+diff --git a/Dockerfile b/Dockerfile
+index 82b0c92c5..88ab077c7 100644
+--- a/Dockerfile
++++ b/Dockerfile
+@@ -6,7 +6,7 @@ RUN mkdir /app /app/static /app/images
+
+ WORKDIR /app
+
+-RUN apt-get update && apt-get install -y gettext libgettextpo-dev tidy && apt-get clean
++RUN apt-get update && apt-get install -y gettext libgettextpo-dev tidy libsass-dev && apt-get clean
+
+-COPY requirements.txt /app/
+-RUN pip install -r requirements.txt --no-cache-dir
++COPY . /app
++RUN env SYSTEM_SASS="true" pip install -r requirements.txt --no-cache-dir