ci: extract Reload Caddy step into a composite action #539
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
The
Reload Caddystep (privileged Alpine container + nsenter) is currently duplicated identically innightly.ymlandrelease.yml. Both workflows were updated in PR #537 to use a pinned Alpine digest andreloadinstead ofrestart.Problem
Any future change — e.g. a Renovate bump to a newer Alpine digest, or a change to the nsenter flags — must be applied in two places. This is a maintenance risk.
Proposed solution
Extract the step into a local composite action at
.gitea/actions/reload-caddy/action.yml:Then both workflows call it with:
Acceptance criteria
.gitea/actions/reload-caddy/action.ymlnightly.ymlReload Caddy step replaced withuses: ./.gitea/actions/reload-caddyrelease.ymlReload Caddy step replaced withuses: ./.gitea/actions/reload-caddydocs/infrastructure/ci-gitea.mdupdated to reference the composite actionNotes
uses: ./.gitea/actions/<name>(same as GitHub Actions for local actions)descriptionfield and in theaction.ymlinline comments — it does not need to be repeated in each calling workflow