Fix build: fetch latest upstream webhook release tarball

Upstream stopped shipping bare binaries; 2.8.2 URL 404s. Resolve the latest
release at build time so scheduled rebuilds track upstream.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SNMztZDM1qUGnixHeevkuw
This commit is contained in:
2026-09-13 09:59:47 +02:00
co-authored by Claude Fable 5.1
parent f7970692a6
commit 205d3a462d
2 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ build:
before_script: before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script: script:
- docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:latest" . - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:latest" .
- docker push --all-tags "$CI_REGISTRY_IMAGE" - docker push --all-tags "$CI_REGISTRY_IMAGE"
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+8 -3
View File
@@ -1,12 +1,17 @@
FROM alpine:latest FROM alpine:latest
# ponytail: resolves latest upstream release at build time via the /releases/latest redirect
# (no GitHub API rate limit); pin WEBHOOK_VERSION if a release ever breaks.
ARG WEBHOOK_VERSION=latest
RUN apk add --no-cache \ RUN apk add --no-cache \
curl \ curl \
docker-cli \ docker-cli \
docker-cli-compose && \ docker-cli-compose && \
wget -O /usr/local/bin/webhook \ v="$WEBHOOK_VERSION" && \
https://github.com/adnanh/webhook/releases/download/2.8.2/webhook-linux-amd64 && \ [ "$v" != latest ] || v=$(basename "$(curl -sIL -o /dev/null -w '%{url_effective}' https://github.com/adnanh/webhook/releases/latest)") && \
chmod +x /usr/local/bin/webhook curl -fsSL "https://github.com/adnanh/webhook/releases/download/$v/webhook-linux-amd64.tar.gz" \
| tar xz --strip-components=1 -C /usr/local/bin webhook-linux-amd64/webhook && \
webhook -version
EXPOSE 9000 EXPOSE 9000
ENTRYPOINT ["webhook"] ENTRYPOINT ["webhook"]