feat: workflow subdirectory discovery + move custom workflows to custom/ (#693)
Deploy MokoGitea / deploy (push) Failing after 4m16s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 10s
Universal: PR Check / Secret Scan (pull_request) Successful in 1m0s
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled

Gitea's ListWorkflows already uses ListEntriesRecursiveFast (git ls-tree -r)
which discovers workflows in subdirectories. Added test cases confirming
subdirectory and deeply nested paths are recognized by IsWorkflow.

Moved 6 repo-specific workflows (no FILE INFORMATION sync header) to
.mokogitea/workflows/custom/ to separate them from template-synced workflows:
deploy-mokogitea, deploy-dev, cascade-dev, pr-rc-release, test-mokogitea,
upstream-bug-sync.

Also fixes deploy-mokogitea.yml: merged the dev health check into the deploy
job as step 1 to avoid runner status reporting failures on inter-job handoff
(check-dev job was recorded as "skipped" despite passing, cancelling deploy).

Closes #693

Claude-Session: https://claude.ai/code/session_011AAFzotGMf3ayvXhEmStCd
This commit is contained in:
2026-06-27 14:33:28 -05:00
parent e66c75753d
commit afe46361c7
8 changed files with 17 additions and 7 deletions
@@ -36,11 +36,10 @@ env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
check-dev:
name: "Verify dev environment is healthy"
deploy:
runs-on: ubuntu-latest
steps:
- name: Check dev health
- name: Verify dev environment is healthy
run: |
echo "Checking git.dev.mokoconsulting.tech health..."
if curl -sf --max-time 10 https://git.dev.mokoconsulting.tech/api/healthz; then
@@ -51,10 +50,6 @@ jobs:
exit 1
fi
deploy:
needs: check-dev
runs-on: ubuntu-latest
steps:
- name: Checkout source (for version detection)
uses: actions/checkout@v4
with:
+3
View File
@@ -3,6 +3,7 @@
## [Unreleased]
### Added
- Workflow subdirectory discovery: workflows in subdirectories of `.mokogitea/workflows/` are now auto-discovered (#693)
- API token scope `read:licensing` / `write:licensing` for licensing endpoints (#697)
- Edit API token scopes: PATCH /users/{username}/tokens/{id} API endpoint + web UI edit button (#697)
- Wiki full-text search: case-insensitive search across all wiki page titles and content (#550)
@@ -44,6 +45,7 @@
- Workflow tokens: standardize all GA_TOKEN/GITEA_TOKEN/GITEA_URL env vars to MOKOGITEA_TOKEN/MOKOGITEA_URL across all workflow files in 5 template repos + MokoCLI (65+ files)
- CI issue reporter: rename GITEA_TOKEN/GITEA_URL to MOKOGITEA_TOKEN/MOKOGITEA_URL in automation/ci-issue-reporter.sh
- Workflow sync trigger: add workflow_dispatch event, fix if-condition to allow manual dispatch, add PHP install step for non-PHP runners
- Deploy workflow: merge dev health check into deploy job to avoid runner status reporting failures on inter-job handoff
- Licensing API: handle DB write errors in UpdateLicense, UpdateTier, DeleteTier instead of silently discarding
- Wiki API: fix findEntryForFile URL-decode fallback for non-ASCII page names
- Metadata settings template 500 error: removed reference to deleted Version field
@@ -53,6 +55,7 @@
- Issue statuses template: garbled em-dash character replaced
### Changed
- Custom workflows moved to `.mokogitea/workflows/custom/`: deploy-mokogitea, deploy-dev, cascade-dev, pr-rc-release, test-mokogitea, upstream-bug-sync
- Issue status seed defaults: Open, In Progress, Waiting, In Review, Closed, Won't Fix
- Pre-release workflow: auto-bump skipped for non-Joomla repos (platform check)
- CI issue reporter: moved to MokoCLI (cli/ci_issue_reporter.sh), pr-check and repo-health now use ci-issue-reporter.yml reusable workflow
+12
View File
@@ -78,6 +78,18 @@ func TestIsWorkflow(t *testing.T) {
path: ".gitea/workflows2/test.yml",
expected: false,
},
{
name: "subdirectory workflow",
dirs: []string{".gitea/workflows"},
path: ".gitea/workflows/custom/deploy.yml",
expected: true,
},
{
name: "deeply nested subdirectory workflow",
dirs: []string{".mokogitea/workflows"},
path: ".mokogitea/workflows/custom/deploy/staging.yaml",
expected: true,
},
{
name: "unrelated path",
dirs: []string{".gitea/workflows", ".github/workflows"},