feat: service workflow deploy dispatch

This commit is contained in:
Benjamin Labrecque
2026-08-27 12:08:34 +02:00
parent 320b974bf3
commit 3b92c472d7
2 changed files with 47 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
# Deploys and restarts a single service or all services.
#
# Usage: ./.gitea/scripts/deploy-for-services.sh <service-name|all> <dev|prod>
set -euo pipefail
SERVICE=${1:-}
AGEBD_ENV=${2:-}
SCRIPT_DIR=$(dirname "$0")
if [ "${SERVICE}" = "all" ]; then
SERVICES=$(ls -d services/*/ | xargs -n1 basename)
else
SERVICES=${SERVICE}
fi
for SERVICE_NAME in ${SERVICES}; do
"${SCRIPT_DIR}/deploy-service.sh" "${SERVICE_NAME}" "${AGEBD_ENV}" true
done
+27
View File
@@ -0,0 +1,27 @@
name: Service
# Manually re-deploy (and restart) individual services, or all of them, in dev.
# There is deliberately no prod option here - prod deploys go through the
# normal push-to-main flow (see the 'Deploy' workflow), which requires review.
on:
workflow_dispatch:
inputs:
service:
description: "Service name in lower case, or 'all' for every service"
type: string
required: true
env:
UV_CACHE_DIR: /var/cache/uv
UV_LINK_MODE: hardlink
jobs:
deploy-dev:
runs-on: hla-dev
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy and restart ${{ inputs.service }}
run: |
./.gitea/scripts/deploy-for-services.sh "${{ inputs.service }}" "dev"