fix: align SENTRY_RELEASE env var with the release created by the Sentry action (#169)

The Sentry action receives the v-stripped version (e.g. 0.1.1) but the
app's SENTRY_RELEASE was set to IMAGE_TAG (e.g. v0.1.1). This caused
Sentry to auto-create a second release from incoming events, labelling it
(non-semver) instead of associating events with the properly created release.

Pass SENTRY_RELEASE as a separate query param through the Portainer webhook
(using the already-computed sentry_version output) and reference that in
compose.prod.yaml instead of IMAGE_TAG.
This commit is contained in:
2026-07-03 13:28:22 +02:00
committed by GitHub
parent 8c72b1b217
commit b1f84d441f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -244,4 +244,4 @@ jobs:
env:
PORTAINER_WEBHOOK: ${{secrets.PORTAINER_WEBHOOK}}
run: |
curl -v -X POST "${PORTAINER_WEBHOOK}?IMAGE_TAG=${{steps.meta.outputs.tag}}" --fail-with-body
curl -v -X POST "${PORTAINER_WEBHOOK}?IMAGE_TAG=${{steps.meta.outputs.tag}}&SENTRY_RELEASE=${{steps.meta.outputs.sentry_version}}" --fail-with-body
+1 -1
View File
@@ -10,7 +10,7 @@ services:
MAILER_DSN: ${MAILER_DSN}
MAILER_SENDER: ${MAILER_SENDER}
SENTRY_DSN: ${SENTRY_DSN}
SENTRY_RELEASE: ${IMAGE_TAG}
SENTRY_RELEASE: ${SENTRY_RELEASE}
SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT}
labels:
- "traefik.enable=true"