Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use webhooks for container updates instead of relying on polling #1

Open
hrideshmg opened this issue Jan 28, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@hrideshmg
Copy link
Member

Currently, Watchtower polls the GitHub Container Registry (GHCR) every 10 seconds to check for updates. However, Watchtower supports an HTTP-API mode that allows it to act as a webhook server to trigger updates. This approach would be ideal as it eliminates the need for polling. Additionally, GHCR supports webhooks, making this integration possible.

The main challenge is that Watchtower expects a secret in the Authorization HTTP header, but GitHub does not allow custom headers and instead sends the (hashed) secret in a X-Hub-Signature-256 header, see: validating webhook deliveries.

One possible solution is to write a lightweight middleware that intercepts this request, validates it, and sends the correct request to Watchtower to trigger the update.

@hrideshmg hrideshmg added the enhancement New feature or request label Jan 28, 2025
@hrideshmg hrideshmg moved this to Needs Discussion in CMS Tasks Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Needs Discussion
Development

No branches or pull requests

1 participant