Skip to content
Merged
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
31 changes: 17 additions & 14 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,6 @@ jobs:
- arch: arm64
os: linux/arm64
runner: blacksmith-4vcpu-ubuntu-2404-arm
include:
- service: api
description: "Databuddy API service - analytics backend"
- service: basket
description: "Databuddy Basket service - event ingestion"
- service: dashboard
description: "Databuddy Dashboard service - web analytics UI"
- service: insights
description: "Databuddy Insights service - queued insight generation"
- service: links
description: "Databuddy Links service - URL shortening and tracking"
- service: uptime
description: "Databuddy Uptime service - availability monitoring"

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
Expand Down Expand Up @@ -140,14 +127,30 @@ jobs:
echo "tag=edge" >> "$GITHUB_OUTPUT"
fi

- name: Resolve service description
id: description
env:
SERVICE: ${{ matrix.service }}
run: |
case "$SERVICE" in
api) text="Databuddy API service - analytics backend" ;;
basket) text="Databuddy Basket service - event ingestion" ;;
dashboard) text="Databuddy Dashboard service - web analytics UI" ;;
insights) text="Databuddy Insights service - queued insight generation" ;;
links) text="Databuddy Links service - URL shortening and tracking" ;;
uptime) text="Databuddy Uptime service - availability monitoring" ;;
*) echo "Unknown service $SERVICE" >&2; exit 1 ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This case statement re-enumerates the six services that the detect job already lists in both its ALL array and its for svc in ... loop. Adding a service to detect without adding it here makes the build fail with Unknown service $SERVICE, so keep the three lists in sync (or drive the description from a shared source). Consider a comment cross-referencing the detect list to make the required alignment visible.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/docker-publish.yml, line 142:

<comment>This case statement re-enumerates the six services that the `detect` job already lists in both its `ALL` array and its `for svc in ...` loop. Adding a service to `detect` without adding it here makes the build fail with `Unknown service $SERVICE`, so keep the three lists in sync (or drive the description from a shared source). Consider a comment cross-referencing the `detect` list to make the required alignment visible.</comment>

<file context>
@@ -140,14 +127,30 @@ jobs:
+            insights) text="Databuddy Insights service - queued insight generation" ;;
+            links) text="Databuddy Links service - URL shortening and tracking" ;;
+            uptime) text="Databuddy Uptime service - availability monitoring" ;;
+            *) echo "Unknown service $SERVICE" >&2; exit 1 ;;
+          esac
+          echo "text=$text" >> "$GITHUB_OUTPUT"
</file context>

esac
echo "text=$text" >> "$GITHUB_OUTPUT"

- name: Extract metadata (labels)
id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6
with:
images: ${{ env.IMAGE_PREFIX }}-${{ matrix.service }}
labels: |
org.opencontainers.image.title=databuddy-${{ matrix.service }}
org.opencontainers.image.description=${{ matrix.description }}
org.opencontainers.image.description=${{ steps.description.outputs.text }}
org.opencontainers.image.vendor=Databuddy Analytics
org.opencontainers.image.licenses=AGPL-3.0

Expand Down