devops: extract composite action for obs stack deploy steps #603
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
nightly.ymlandrelease.ymlboth contain four identical obs-deploy steps:rsyncto/opt/familienarchiv/, writeobs-secrets.envdocker compose config --quietdocker compose up -d --waitThe only difference between the two workflows is:
STAGING_*vsPROD_*)POSTGRES_HOSTvalue is written (archiv-staging-db-1vsarchiv-production-db-1)This duplication means any future fix (e.g. adding a new healthchecked service, changing the rsync flags) must be applied in two places. The
# Keep in sync with nightly.ymlcomments are a smell that a composite action is the right fix.Proposal
Create a Gitea composite action at
.gitea/actions/deploy-obs/action.ymlwith inputs:grafana_admin_passwordglitchtip_secret_keypostgres_passwordpostgres_hostarchiv-staging-db-1The action runs all four steps internally. Both workflows call it once:
Acceptance criteria
.gitea/actions/deploy-obs/action.ymlimplements all 4 steps as a composite actionnightly.ymlreplaces its 4 obs steps with a singleuses:callrelease.ymlreplaces its 4 obs steps with a singleuses:call# Keep in sync with nightly.ymlcomments are removed (no longer needed)