aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Hunt <me@liz.coffee>2026-06-21 10:29:43 -0700
committerAlexander Hunt <me@liz.coffee>2026-06-21 10:29:43 -0700
commit081d5921e45e566c4886bce0e818ea5190e5b5df (patch)
tree156691f0c1e1d0bca7a0f17f08c613a1bab56899
parent24fb1c119cdb40f84ef2d1733f549ef60c578770 (diff)
downloadci-081d5921e45e566c4886bce0e818ea5190e5b5df.tar.gz
ci-081d5921e45e566c4886bce0e818ea5190e5b5df.zip
Fetches coolify secrets for webhook job host
-rwxr-xr-xworker/scripts/coolify_webhook.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/worker/scripts/coolify_webhook.ts b/worker/scripts/coolify_webhook.ts
index d1b4eb0..8859023 100755
--- a/worker/scripts/coolify_webhook.ts
+++ b/worker/scripts/coolify_webhook.ts
@@ -43,8 +43,10 @@ await LogMetricTraceable.ofLogTraceable(_logJob)
.map(async (tEitherJobVault) => {
const eitherJobVault = await tEitherJobVault.get();
return eitherJobVault.flatMapAsync(async ({ job, key, vault }) => {
- tEitherJobVault.trace.trace('fetching coolify secret from vault...');
- const eitherSecret = await vault.fetchSecret<SecureNote>(tEitherJobVault, key, 'coolify');
+ const coolifyHost = new URL(job.arguments.webhookUrl).hostname;
+ const secretName = `coolify--${coolifyHost}`;
+ tEitherJobVault.trace.trace(`fetching coolify secret from vault (${secretName})...`);
+ const eitherSecret = await vault.fetchSecret<SecureNote>(tEitherJobVault, key, secretName);
await vault.lock(tEitherJobVault, key);
eitherSecret.fold(