Template
feat(ci): own MokoGitea deploy workflows (dev/rc/prod) as canonical synced source #5
Reference in New Issue
Block a user
Delete Branch "feat/own-deploy-workflows"
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?
Makes Template-Go the canonical, parameterized, template-owned source for the three MokoGitea Go-server deploy workflows. Adds them to the root synced dir
.mokogitea/workflows/(not acustom/subdir).Workflows
deploy-dev.ymldev+ workflow_dispatchDEV_*deploy-rc.ymlrc+ workflow_dispatchRC_*(reference pattern)deploy-prod.ymlmain+ workflow_dispatchPROD_*(also pushes:latest)All three are identical in structure, differing only by the
{TIER}_variable prefix and trigger branch. Each header lists its required tier-scoped VARIABLES ({TIER}_SSH_HOST/PORT/USERNAME,{TIER}_REGISTRY/REGISTRY_USER/IMAGE,{TIER}_CONTAINER/COMPOSE_PROJECT/COMPOSE_DIR/SOURCE_DIR/TAG_ENV/HEALTH_URL).Shared secrets (reused, not re-created)
secrets.DEPLOY_SSH_KEY— deploy private keysecrets.MOKOGITEA_TOKEN— registry/API tokenPattern
All config comes from repo Actions variables (nothing hardcoded): quoted heredoc with
TAG/REGISTRY_TOKENinjected via ssh env-prefix, the${TIER}_TAG_ENVcompose env-var driving the shared compose file (nosed),docker rm -fbefore--force-recreate, health-check loop, externalcurlverify, and clone URL from${{ github.server_url }}/${{ github.repository }}.deploy-prod.ymlconverts the oldsed+ unquoted-heredocdeploy-mokogitea.ymllogic to this fixed env-var pattern while keeping the prod-only:latesttag push.Follow-up (not in this PR)
The fork's
.mokogitea/workflows/custom/deploy copies (deploy-dev.yml,deploy-mokogitea.yml) will be removed in a separate verified follow-up once this canonical source is in place. MokoGitea-Fork working copies are untouched here.Closes Template-Go#3
Refs MokoGitea-Fork#751
Claude-Session: https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
Add three tier-scoped deploy workflows to the root .mokogitea/workflows/ dir so Template-Go is the canonical source that syncs to Go server repos: - deploy-dev.yml : push to `dev`, DEV_* variables - deploy-rc.yml : push to `rc`, RC_* variables (reference pattern) - deploy-prod.yml : push to `main`, PROD_* variables (+ :latest tag push) All three share identical structure and reuse the org secrets DEPLOY_SSH_KEY + MOKOGITEA_TOKEN. Deployment config is fully parameterized via repo Actions variables (nothing hardcoded): quoted heredoc with TAG/REGISTRY_TOKEN injected via ssh env-prefix, the ${TIER}_TAG_ENV compose env-var driving the shared compose file (no sed), docker rm -f before --force-recreate, health-check loop, and an external curl verify. Closes #3 Claude-Session: https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KTView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.