fix(webhook): port shebang to /bin/sh and add automatic package installation

This commit is contained in:
allaun 2026-07-05 23:22:01 -05:00
parent d7bcbc243e
commit b40dd896bb
2 changed files with 12 additions and 6 deletions

View file

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/sh
set -euo pipefail set -eu
REPO="${1:-}" REPO="${1:-}"
if [[ -z "$REPO" ]]; then if [ -z "$REPO" ]; then
echo "Usage: $0 <repo-name>" >&2 echo "Usage: $0 <repo-name>" >&2
exit 1 exit 1
fi fi
@ -23,7 +23,7 @@ log "Git updated to $(git rev-parse --short HEAD)"
case "$REPO" in case "$REPO" in
SilverSight) SilverSight)
# Homarr # Homarr
if [[ -f "$SECRETS_DIR/homarr-values.enc.yaml" ]]; then if [ -f "$SECRETS_DIR/homarr-values.enc.yaml" ]; then
log "Deploying Homarr..." log "Deploying Homarr..."
sops --decrypt --output-type yaml "$SECRETS_DIR/homarr-values.enc.yaml" > /tmp/homarr-values.yaml sops --decrypt --output-type yaml "$SECRETS_DIR/homarr-values.enc.yaml" > /tmp/homarr-values.yaml
helm upgrade --install homarr oci://ghcr.io/homarr-labs/charts/homarr \ helm upgrade --install homarr oci://ghcr.io/homarr-labs/charts/homarr \
@ -34,7 +34,7 @@ case "$REPO" in
fi fi
# Authentik # Authentik
if [[ -f "$SECRETS_DIR/authentik-values.enc.yaml" ]]; then if [ -f "$SECRETS_DIR/authentik-values.enc.yaml" ]; then
log "Deploying Authentik..." log "Deploying Authentik..."
sops --decrypt --output-type yaml "$SECRETS_DIR/authentik-values.enc.yaml" > /tmp/authentik-values.yaml sops --decrypt --output-type yaml "$SECRETS_DIR/authentik-values.enc.yaml" > /tmp/authentik-values.yaml
helm upgrade --install authentik oci://ghcr.io/goauthentik/helm-charts/authentik \ helm upgrade --install authentik oci://ghcr.io/goauthentik/helm-charts/authentik \

View file

@ -23,7 +23,7 @@ spec:
serviceAccountName: webhook-deployer serviceAccountName: webhook-deployer
containers: containers:
- name: webhook - name: webhook
image: ghcr.io/adnanh/webhook:latest image: almir/webhook:latest
args: args:
- -hooks=/config/hooks.yaml - -hooks=/config/hooks.yaml
- -verbose - -verbose
@ -31,6 +31,12 @@ spec:
ports: ports:
- containerPort: 9000 - containerPort: 9000
name: http name: http
securityContext:
runAsUser: 0
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "apk add --no-cache git helm sops"]
env: env:
- name: WEBHOOK_SECRET - name: WEBHOOK_SECRET
valueFrom: valueFrom: