feat(ci): own MokoGitea deploy workflows (dev/rc/prod) as canonical synced source #5

Open
jmiller wants to merge 1 commits from feat/own-deploy-workflows into main
Owner

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 a custom/ subdir).

Workflows

File Trigger Variable prefix
deploy-dev.yml push to dev + workflow_dispatch DEV_*
deploy-rc.yml push to rc + workflow_dispatch RC_* (reference pattern)
deploy-prod.yml push to main + workflow_dispatch PROD_* (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 key
  • secrets.MOKOGITEA_TOKEN — registry/API token

Pattern

All config comes from 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, external curl verify, and clone URL from ${{ github.server_url }}/${{ github.repository }}. deploy-prod.yml converts the old sed + unquoted-heredoc deploy-mokogitea.yml logic to this fixed env-var pattern while keeping the prod-only :latest tag 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

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 a `custom/` subdir). ## Workflows | File | Trigger | Variable prefix | |---|---|---| | `deploy-dev.yml` | push to `dev` + workflow_dispatch | `DEV_*` | | `deploy-rc.yml` | push to `rc` + workflow_dispatch | `RC_*` (reference pattern) | | `deploy-prod.yml` | push to `main` + workflow_dispatch | `PROD_*` (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 key - `secrets.MOKOGITEA_TOKEN` — registry/API token ## Pattern All config comes from 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, external `curl` verify, and clone URL from `${{ github.server_url }}/${{ github.repository }}`. `deploy-prod.yml` converts the old `sed` + unquoted-heredoc `deploy-mokogitea.yml` logic to this fixed env-var pattern while keeping the prod-only `:latest` tag 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
jmiller added 1 commit 2026-07-06 01:19:59 +00:00
feat(ci): own MokoGitea deploy workflows (dev/rc/prod) as canonical synced source
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: PR Check / Branch Policy (pull_request) Failing after 2s
Generic: Repo Health / Access control (pull_request) Successful in 1s
Generic: Project CI / Lint & Validate (pull_request) Successful in 8s
Universal: PR Check / Validate PR (pull_request) Failing after 8s
Universal: PR Check / Secret Scan (pull_request) Successful in 9s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
80d7bd166f
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_01Wsno14cxE49MstXFs9G5KT
Some required checks failed
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: PR Check / Branch Policy (pull_request) Failing after 2s
Generic: Repo Health / Access control (pull_request) Successful in 1s
Generic: Project CI / Lint & Validate (pull_request) Successful in 8s
Universal: PR Check / Validate PR (pull_request) Failing after 8s
Universal: PR Check / Secret Scan (pull_request) Successful in 9s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/own-deploy-workflows:feat/own-deploy-workflows
git checkout feat/own-deploy-workflows
Sign in to join this conversation.
No Reviewers
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/Template-Go#5