Skip to content

About

Reusable Gitea Actions workflows for DevOps and software engineers: mirror metadata sync today, quality checks and releases planned.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

498 Commits

Folders and files

Repository files navigation

πŸš€ TirSystem GitHub Actions

A collection of reusable Gitea Actions workflows for DevOps professionals and software engineers working on TirSystem projects.

πŸ“š Table of Contents

🧭 Overview

This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at git.tirsystem.com (Gitea) and is push-mirrored to GitHub.

It contains twelve workflows: metadata sync to the GitHub mirror, wiki publishing (scoped, for every repository with a docs/wiki/ folder), shared quality checks for Python and shell, for C and C++ and for C#, code metrics and coverage badges, a check that comments are in English, a static security scan with OpenGrep (scoped), a validation of the workflow files and shell scripts of every repository (scoped), a release workflow (scoped, started by hand), the publishing of accepted milestones (scoped, for every repository with a docs/milestones/ folder) and the repository's own validation. They are listed with their purpose and a diagram under Workflows.

πŸ”§ Workflows

When a repository should use each workflow in its SQA and QC is set out in the adoption rules.

Twelve workflows live in this repository. A scoped workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a reusable workflow is called by a repository with uses:; the others run only here. The diagrams are PlantUML source.

Workflow File Kind Starts on Purpose
Sync GitHub mirror metadata sync-github-metadata.yml Scoped push to main, manual, daily 03:17 UTC Copies the description and topics of a Gitea repository to its GitHub push mirror
Publish wiki pages publish-wiki-pages.yml Scoped push to main that changes docs/wiki/**, manual Publishes the pages in docs/wiki/ to the wiki of the repository; skipped where the folder does not exist
OpenGrep opengrep.yml Scoped pull request, push to main, manual Scans the repository with OpenGrep (LGPL-2.1) and a pinned set of its community rules, without a login; a finding of severity ERROR fails the run, the others are listed; skipped where no tracked file is scanned
Validate validate.yml Scoped pull request, push to main, manual Checks the workflow files (WF-1 to WF-20 criteria a script can decide) and runs shellcheck and shfmt on the tracked shell scripts; an error fails the run, WF-5 is a warning; green where there is nothing to validate
Quality checks quality-checks.yml Reusable (workflow_call) a call from another repository Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing
Quality checks C++ quality-checks-cpp.yml Reusable (workflow_call) a call from another repository Runs clang-format and clang-tidy at exact versions on the tracked C and C++ files and changes nothing
Quality checks C# quality-checks-csharp.yml Reusable (workflow_call) a call from another repository Runs dotnet format and dotnet build on an exact .NET SDK 10 or later and changes nothing
Code metrics code-metrics.yml Reusable (workflow_call) a call from another repository Counts the code files and the lines of code (without comment and blank lines), reads a Cobertura coverage report and commits three SVG badges to a badges branch
English comments english-comments.yml Reusable (workflow_call) a call from another repository, on a pull request Judges the language of the comments and docstrings a pull request adds, fails the run when one is not English and writes one comment on the pull request that mentions the author
Release release.yml Scoped push to the default branch that changes CHANGELOG.md, or by hand to retry (no form; the version is the newest numbered entry of CHANGELOG.md), and a pull request as a check that writes nothing Creates the version tag, the release page and, from 1.0.0, the major tag of any repository after the checks; needs the secret TOKEN_FOR_GITEA_RELEASE, with no fallback
Publish accepted milestones sync-milestones.yml Scoped push to the default branch that changes docs/milestones/** or docs/sqa/reviews/**, manual (dry run by default) Creates or updates the Gitea milestone and issues of every milestone that is Accepted with a Go review; skipped where docs/milestones/ does not exist; needs the secrets TOKEN_FOR_GITEA_REPO and TOKEN_FOR_GITEA_ISSUES, with no fallback
Validate workflows validate-workflows.yml This repository only pull request, push to main, manual Parses every workflow and runs the offline tests

πŸ”„ Sync GitHub metadata

Syncs the Gitea repository description and topics to the GitHub push mirror.

πŸ•’ Cron

Daily at 03:17 UTC (17 3 * * *), plus every push to main and manual workflow_dispatch.

πŸ”€ Workflow

@startuml
title Sync Gitea repository description and topics to GitHub

autonumber

actor "Push to main,\nmanual trigger, or schedule" as Trigger
participant "Gitea Actions\nsync-github-metadata" as Workflow
participant "Gitea REST API" as Gitea
participant "GitHub REST API" as GitHub

Trigger -> Workflow: Start workflow
activate Workflow

Workflow -> Workflow: Read and validate secrets
note right
TOKEN_FOR_GITEA_REPO
PAT_FOR_GITHUB
end note

alt secret validation failed
  Workflow --> Trigger: workflow failed
end


Workflow -> Gitea: GET /repos/{owner}/{repo}
Gitea --> Workflow: Description and topics

Workflow -> Gitea: GET /repos/{owner}/{repo}/push_mirrors
Gitea --> Workflow: Push mirror response

alt mirrors is not a list
    Workflow --> Trigger: Log a warning and succeed\n(GitHub metadata not synced)
else mirrors is a list with no GitHub mirror
    Workflow --> Trigger: Log that there is nothing to sync and succeed
else mirrors is a list
    Workflow -> Workflow: Find GitHub owner and repo from remote_address

    Workflow -> GitHub: PATCH /repos/{owner}/{repo}\n{description}
    GitHub --> Workflow: Repository updated

    Workflow -> GitHub: PUT /repos/{owner}/{repo}/topics\n{names}
    GitHub --> Workflow: Topics updated

    Workflow --> Trigger: Sync completed
else Gitea API denies access
    Gitea --> Workflow: HTTP 403 Forbidden
    Workflow --> Trigger: Workflow fails
else GitHub API denies access
    GitHub --> Workflow: HTTP error
    Workflow --> Trigger: Workflow fails
end
deactivate Workflow
@enduml

βœ… Quality checks

A reusable workflow for Python and shell, called with uses: TirSystem/git-workflows/.gitea/workflows/quality-checks.yml@v1 (see the guide).

πŸ”€ Workflow

@startuml
title Shared quality checks (reusable workflow)

autonumber

actor "Calling repository\nuses: ...quality-checks.yml@v1" as Caller
participant "Gitea Actions\nquality-checks" as Workflow
participant "PyPI" as PyPI

Caller -> Workflow: workflow_call with languages,\nworking-directory and tool versions
activate Workflow

Workflow -> Workflow: Validate the inputs
alt languages or working-directory is invalid
  Workflow --> Caller: Fail with [configuration]
end

Workflow -> Workflow: Check out the calling repository
Workflow -> PyPI: Install the pinned tools in a virtual environment\n(ruff, mypy, shellcheck-py, shfmt-py as selected)
PyPI --> Workflow: Tools installed

loop for each selected language
  Workflow -> Workflow: List tracked files
  alt no files of that language
    Workflow -> Workflow: Notice: nothing was checked
  else
    Workflow -> Workflow: Run every tool and record PASS or FAIL
  end
end

alt any tool failed
  Workflow --> Caller: Fail and list the failed tools
else
  Workflow --> Caller: All selected checks passed
end
deactivate Workflow
@enduml

🧱 Quality checks C++

A reusable workflow for C and C++, called with uses: TirSystem/git-workflows/.gitea/workflows/quality-checks-cpp.yml@v1 (ADR-0008). The repository needs a .clang-format; a .clang-tidy and a compile database are optional.

πŸ”€ Workflow

@startuml
title Shared quality checks for C and C++ (reusable workflow)

autonumber

actor "Calling repository\nuses: ...quality-checks-cpp.yml@v1" as Caller
participant "Gitea Actions\nquality-checks-cpp" as Workflow
participant "PyPI" as PyPI

Caller -> Workflow: workflow_call with working-directory, std,\ncompile-commands-dir and tool versions
activate Workflow

Workflow -> Workflow: Check out the caller and the shared script
Workflow -> Workflow: Validate the inputs
alt an input is invalid or a version is not exact
  Workflow --> Caller: Fail with [configuration]
end

Workflow -> PyPI: Install clang-format and clang-tidy at the exact versions
PyPI --> Workflow: Tools installed

alt no C or C++ file is tracked
  Workflow --> Caller: Notice: nothing was checked, pass
else no .clang-format, or compile-commands-dir\nwithout compile_commands.json
  Workflow --> Caller: Fail with [configuration]
else
  Workflow -> Workflow: clang-format --dry-run -Werror on all files
  Workflow -> Workflow: clang-tidy on the C++ files (-std=std)\nand on the C files (or with the compile database)
  alt any tool failed
    Workflow --> Caller: Fail with tool, file and line in the log
  else
    Workflow --> Caller: All selected checks passed
  end
end
deactivate Workflow
@enduml

🟣 Quality checks C#

A reusable workflow for C#, called with uses: TirSystem/git-workflows/.gitea/workflows/quality-checks-csharp.yml@v1 (ADR-0008). It installs the exact .NET SDK given by dotnet-sdk-version (10 or later) and needs the network for the package restore.

πŸ”€ Workflow

@startuml
title Shared quality checks for C# (reusable workflow)

autonumber

actor "Calling repository\nuses: ...quality-checks-csharp.yml@v1" as Caller
participant "Gitea Actions\nquality-checks-csharp" as Workflow
participant "dot.net\n(dotnet-install.sh)" as DotNet

Caller -> Workflow: workflow_call with working-directory,\nproject and dotnet-sdk-version
activate Workflow

Workflow -> Workflow: Check out the caller and the shared script
Workflow -> Workflow: Validate the inputs
alt an input is invalid or the SDK is not an exact\nstable version 10 or later
  Workflow --> Caller: Fail with [configuration]
end

Workflow -> DotNet: Install the exact .NET SDK version
DotNet --> Workflow: SDK installed

alt no C# file is tracked
  Workflow --> Caller: Notice: nothing was checked, pass
else no solution or project, or several without the project input
  Workflow --> Caller: Fail with [configuration] that names them
else
  Workflow -> Workflow: dotnet format --verify-no-changes
  Workflow -> Workflow: dotnet build -warnaserror\n(package restore needs the network)
  alt any tool failed
    Workflow --> Caller: Fail with tool, file and line in the log
  else
    Workflow --> Caller: All selected checks passed
  end
end
deactivate Workflow
@enduml

πŸ… Code metrics

A reusable workflow that counts the code files and the lines of code (without comment and blank lines) of a repository and publishes them, with the test coverage, as three SVG badges on a badges branch, called with uses: TirSystem/git-workflows/.gitea/workflows/code-metrics.yml@v2 (ADR-0010). It needs contents: write and runs no test: an earlier job of the caller produces a Cobertura XML coverage report and uploads it as an artifact (guide).

πŸ”€ Workflow

@startuml
title Code metrics and coverage badges (reusable workflow)

autonumber

actor "Calling repository\nuses: ...code-metrics.yml@v2" as Caller
participant "Gitea Actions\ncode-metrics" as Workflow
participant "Branch badges\nof the caller" as Branch

Caller -> Workflow: workflow_call with working-directory, exclude,\ncoverage-report and thresholds
activate Workflow

Workflow -> Workflow: Check out the caller and the shared scripts
Workflow -> Workflow: Validate the inputs
alt an input is invalid
  Workflow --> Caller: Fail with [configuration]
end

Workflow -> Workflow: Download the coverage artifact (when given)
Workflow -> Workflow: Count code files and lines of code
alt a coverage report is given but missing or malformed
  Workflow --> Caller: Fail with [configuration] that names the file
else
  Workflow -> Workflow: Write code-files.svg, code-lines.svg\nand coverage.svg
end

Workflow -> Branch: Compare with the files of the branch
alt no badge changed
  Workflow --> Caller: Notice: nothing to commit, pass
else
  Workflow -> Branch: One commit with [skip ci]
  Workflow --> Caller: Badges published
end
deactivate Workflow
@enduml

πŸ”€ English comments

A reusable workflow that checks that the comments and docstrings a pull request adds are written in English, fails the run when one is not, and writes one comment on the pull request that mentions the author. It changes no file and sends no source text outside the instance; marking the check as required in the branch protection is what blocks the merge (guide, ADR-0012).

πŸ”€ Workflow

@startuml
title English comments check (reusable workflow)

autonumber

actor "Pull request\nuses: ...english-comments.yml@v2" as Caller
participant "Gitea Actions\nenglish-comments" as Workflow
participant "Gitea REST API" as Gitea

Caller -> Workflow: workflow_call with scope, exclude,\nallowed-words-file, threshold and min-words
activate Workflow

Workflow -> Workflow: Check out the full history and the shared scripts
Workflow -> Workflow: Install the pinned language detector
Workflow -> Workflow: Read the comments on the added lines
Workflow -> Workflow: Remove paths, options, identifiers and allowed words
Workflow -> Workflow: Judge the language of each comment block

alt a block is not English
  Workflow -> Gitea: Create or update one comment that mentions the author
  Workflow --> Caller: run failed (the required check blocks the merge)
else all blocks are English
  Workflow -> Gitea: Mark an earlier comment resolved
  Workflow --> Caller: run passed
end

deactivate Workflow
@enduml

πŸ›‘οΈ OpenGrep

A scoped workflow that scans the repository with OpenGrep v1.33.0 (an LGPL-2.1 fork of Semgrep CE) and the rules of opengrep/opengrep-rules pinned to one commit, fetched with git at run time. OpenGrep is one executable downloaded from the GitHub release and checked against a pinned sha256, with no pip and no account; only Linux x86_64 runners are supported. A finding of severity ERROR fails the run; WARNING and INFO are listed as annotations and in the job summary. It reads files only, has no secret and sends no source code outside the runner (guide, ADR-0015).

πŸ”€ Workflow

@startuml
title OpenGrep scan (scoped workflow)

autonumber

actor "Pull request or push\nto main" as Event
participant "Gitea Actions\nopengrep" as Workflow
participant "github.com" as Registry

Event -> Workflow: Start in every repository
activate Workflow

Workflow -> Workflow: Check out the repository and the shared script
Workflow -> Registry: Download the pinned OpenGrep and check its sha256
Workflow -> Registry: Fetch the pinned rules with git
Workflow -> Workflow: Scan the files and read the JSON report

alt no file is scanned
  Workflow --> Event: run passed, nothing to scan
else a finding of severity ERROR
  Workflow --> Event: run failed (a required check blocks the merge)
else only WARNING and INFO findings
  Workflow --> Event: run passed, findings listed
end

deactivate Workflow
@enduml

βœ… Validate

A scoped workflow that checks the workflow files (*.yml and *.yaml directly in .gitea/workflows, .gitea/scoped_workflows and .github/workflows) against the criteria of QC-WF-001 that a script can decide (WF-1, WF-2, WF-3, WF-5, WF-7, WF-8, WF-9, WF-10, WF-14, WF-20) and runs shellcheck 0.10.0.1 and shfmt 3.11.0.2 on the tracked *.sh files. Every finding is an error except WF-5, a warning. The status is Validate / validate (<event>), which the release workflow requires. It reads files only, has permissions: contents: read and no secret (guide, ADR-0016).

πŸ”€ Workflow

@startuml
title Validate (scoped workflow)

autonumber

actor "Pull request or push\nto main" as Event
participant "Gitea Actions\nvalidate" as Workflow
participant "PyPI" as Registry

Event -> Workflow: Start in every repository
activate Workflow

Workflow -> Workflow: Check out the repository and the shared script
Workflow -> Registry: Install the pinned PyYAML, shellcheck and shfmt
Workflow -> Workflow: Check the workflow files and the shell scripts

alt no workflow file and no shell script
  Workflow --> Event: run passed, nothing to validate
else an error or a tool finds problems
  Workflow --> Event: run failed (a required check blocks the merge)
else only WF-5 warnings
  Workflow --> Event: run passed, warnings listed
end

deactivate Workflow
@enduml

🏷️ Release

A scoped workflow that starts when a change to CHANGELOG.md reaches the default branch of the repository, and by hand to retry a release that failed, with no form: the version is the newest numbered entry of CHANGELOG.md, and if its tag exists there is nothing to release and the run ends green (see the release process, ADR-0017 and its amendment from MIL-020). The release waits up to ten minutes for the green Validate / validate (push) of the same commit. It writes with the organization secret TOKEN_FOR_GITEA_RELEASE (scope write:repository, a dedicated user; see the credentials guide), which is required, with no fallback to the token of the run. The default branch is read from the API. Both changelog formats are read (## [1.2.0] - 2026-10-21 and ## 0.18.0 (2026-10-28)), and the major tag vN exists from version 1.0.0 only. It replaces the workflow .gitea/workflows/release.yml, which is removed. Whether the token can write in a scoped run is still to be verified on the instance (MIL-018 task 1).

πŸ”€ Workflow

@startuml
title Release a repository

autonumber

actor "Merge of a change to CHANGELOG.md\n(push to the default branch),\nor a start by hand" as Trigger
participant "Gitea Actions\nrelease (scoped)" as Workflow
participant "Gitea REST API" as Gitea

Trigger -> Workflow: Push or start by hand, no form
activate Workflow

Workflow -> Workflow: Check the secret TOKEN_FOR_GITEA_RELEASE,\nread CHANGELOG.md and take its newest numbered entry\nas the version
alt secret missing or no changelog entry
  Workflow --> Trigger: Fail with [configuration] or [validation]
end

Workflow -> Gitea: GET tags
Gitea --> Workflow: Existing tags
alt tag of the newest entry exists
  Workflow --> Trigger: Nothing to release, the run is green
end

Workflow -> Gitea: GET repository (default branch)\nand GET branch
Gitea --> Workflow: Tip of the default branch
alt push and the commit is no longer the tip
  Workflow --> Trigger: Skipped, green\n(the newer commit has its own run)
else start by hand and the commit is not the tip
  Workflow --> Trigger: Fail with [validation]
end

loop until green, red or the limit of 10 minutes
  Workflow -> Gitea: GET status of the commit
  Gitea --> Workflow: Validate / validate (push)
end
alt red, or still pending or missing after the limit
  Workflow --> Trigger: Fail with [validation]\n(no tag is created)
end

Workflow -> Gitea: POST release (creates the version tag,\nbody is the changelog entry)
opt version 1.0.0 or later and the highest version of its major
  Workflow -> Gitea: DELETE and POST the major tag vMAJOR
end
Workflow --> Trigger: Released
deactivate Workflow
@enduml

πŸ“– Publish wiki pages

A scoped workflow: the instance runs it in every repository of the organization, so no call and no marker file is needed. A repository opts in by having a docs/wiki folder; where there is none, the run ends without doing anything. It publishes the Markdown pages of docs/wiki to the wiki of the repository and keeps the wiki pages that are not in the folder. It needs the organization secret TOKEN_FOR_GITEA_WIKI.

πŸ”€ Workflow

@startuml
title Publish docs/wiki to the wiki of the repository

autonumber

actor "Push to main that changes docs/wiki/**,\nor manual trigger" as Trigger
participant "Gitea Actions\npublish-wiki-pages" as Workflow
participant "shared-scripts\n(tools/publish_wiki.py at v2)" as Script
participant "Gitea wiki API" as Wiki

Trigger -> Workflow: Start workflow
activate Workflow
Workflow -> Workflow: Check out the repository

alt docs/wiki does not exist
  Workflow --> Trigger: Nothing to publish
else
  Workflow -> Script: Fetch the script, run it
  activate Script
  alt docs/wiki has no Markdown pages
    Script --> Workflow: Fail with [configuration]\n(an empty folder never deletes pages)
  else
    Script -> Script: Read TOKEN_FOR_GITEA_WIKI
    Script -> Wiki: GET repository (preflight)
    Wiki --> Script: Wiki is enabled, token accepted
    Script -> Wiki: GET pages
    Wiki --> Script: Existing pages
    Script -> Wiki: Create new pages, update changed pages
    Script --> Workflow: Log created and updated counts
  end
  deactivate Script
  Workflow --> Trigger: Workflow result
end
deactivate Workflow
@enduml

πŸ“‹ Publish accepted milestones

A scoped workflow: the instance runs it in every repository of the organization, and a repository opts in by having a docs/milestones/ folder; where there is none, the run ends without doing anything. On a push to the default branch that changes the milestones or their reviews, every milestone whose latest Version History row is Accepted and whose latest review is a Go is created or updated on Gitea with its tasks as issues. Nothing is closed or deleted. A manual run is a dry run unless dry_run is switched off. The framework scripts come from the project's own framework/ submodule or, where there is none, from a framework release pinned in the workflow's script; the log prints which. It needs the organization secrets TOKEN_FOR_GITEA_REPO (read the repositories) and TOKEN_FOR_GITEA_ISSUES (issues and milestones), with no fallback (guide, ADR-0018). The secrets and the private framework in a scoped run are not yet verified on the instance (MIL-019).

πŸ”€ Workflow

@startuml
title Publish accepted milestones (scoped workflow)

autonumber

actor "Push to the default branch that changes\ndocs/milestones/** or docs/sqa/reviews/**,\nor manual trigger" as Trigger
participant "Gitea Actions\nsync-milestones" as Workflow
participant "framework/scripts/\nci-publish-milestones.sh" as Script
participant "Gitea REST API" as Gitea

Trigger -> Workflow: Start workflow
activate Workflow
Workflow -> Workflow: Check out the repository\nwith TOKEN_FOR_GITEA_REPO

alt docs/milestones does not exist
  Workflow --> Trigger: Nothing to publish
else TOKEN_FOR_GITEA_REPO or TOKEN_FOR_GITEA_ISSUES is missing
  Workflow --> Trigger: Fail with [configuration]
else
  alt the project has framework/scripts/ci-publish-milestones.sh
    Workflow -> Workflow: Use the project's framework submodule
  else
    Workflow -> Workflow: Check out the framework\nat the pinned FRAMEWORK_TAG
  end
  Workflow -> Workflow: Log the source and the tag or commit
  Workflow -> Script: --accepted-only (dry run)\nor --accepted-only --apply
  activate Script

  loop for each docs/milestones/mil-*.md
    alt latest Version History row is not Accepted,\nor the latest review record is not a Go
      Script -> Script: Skip with the reason on stderr
    else
      alt dry run
        Script -> Script: Print the plan, no network call
      else
        Script -> Gitea: Create or update the Milestone\nand one Issue per task row
        Gitea --> Script: Milestone and issue numbers
      end
    end
  end

  note right of Script
  Nothing is closed or deleted.
  Each real run edits the issues
  of every accepted milestone.
  end note
  Script --> Workflow: Done
  deactivate Script
  Workflow --> Trigger: Workflow result
end
deactivate Workflow
@enduml

πŸ§ͺ Validate workflows

The repository's own validation: the offline tests that gate every pull request.

πŸ”€ Workflow

@startuml
title Validate workflows (this repository's own checks)

autonumber

actor "Pull request,\npush to main, or manual trigger" as Trigger
participant "Gitea Actions\nvalidate-workflows" as Workflow

Trigger -> Workflow: Start workflow
activate Workflow
Workflow -> Workflow: Check out the repository
Workflow -> Workflow: Create a virtual environment and\ninstall tests/requirements.txt
Workflow -> Workflow: Run pytest on tests/ under coverage (offline, no secrets):\nworkflows parse as YAML, no embedded Python,\nscripts compile, wiki pages and translations are current,\nsync, publish and release flows against a fake API

alt a test fails
  Workflow --> Trigger: Workflow fails (the pull request is not ready)
else
  Workflow --> Trigger: Workflow succeeds
end
deactivate Workflow
@enduml

πŸ“‹ Requirements

  • A Gitea instance with Actions enabled and a runner providing ubuntu-latest with python3
  • A configured GitHub push mirror on the Gitea repository (at most one; repositories without a mirror are skipped successfully)
  • Repository secrets:
    • TOKEN_FOR_GITEA_REPO: Gitea API token (the token only, no JSON)
    • PAT_FOR_GITHUB: a GitHub personal access token allowed to edit the mirror repository (the token only, no JSON)
    • TOKEN_FOR_GITEA_WIKI (only for repositories that publish a wiki, see the onboarding guide): a Gitea token that can write the wiki, stored as a secret of the repository's organization; there is no fallback to TOKEN_FOR_GITEA_REPO

πŸ› οΈ Setup

No dependencies need to be installed; the workflow uses only the Python standard library.

  1. Clone the repository:
    git clone ssh://git@git.tirsystem.com:10022/TirSystem/git-workflows.git
  2. Add the secrets listed under Requirements to the repository settings in Gitea.
  3. Configure the GitHub push mirror in the repository settings.

▢️ Run

Workflows run automatically on push to main and on the daily schedule. To run manually, trigger Sync GitHub mirror metadata via workflow_dispatch from the Actions tab in Gitea.

πŸ§ͺ Tests

The workflow files and the scripts in tools/ are validated by offline tests that need no network access and no secrets:

python3 -m venv .venv
source .venv/bin/activate        # Windows PowerShell: .venv\Scripts\Activate.ps1
python -m pip install -r tests/requirements.txt
python -m coverage run -m pytest -q tests
python -m coverage report

The same checks run on every pull request and push to main through validate-workflows.yml. They parse every workflow as YAML, check that none embeds Python, compile the scripts in tools/, require explicit job permissions, and test credential parsing, push mirror address parsing and the sync and publish flows against a fake API. The run fails when the line and branch coverage of tools/ falls below 95% (.coveragerc).

After a change to the sync workflow, also trigger Sync GitHub mirror metadata manually in Gitea and compare the description and topics on the GitHub mirror.

🟒 Capabilities

Rows that say Implemented or Guides written exist today. The rest is planned and tracked in the Project Plan, which also describes each use case.

Capability Status
Synchronize repository metadata (Gitea to GitHub mirror) Implemented in .gitea/scoped_workflows/, with offline tests and a validation workflow
Configure and validate workflow credentials Implemented for the sync workflow: preflight checks both tokens before any change (guide)
Onboard a repository, manage runners, diagnose failures Guides written (onboarding, troubleshooting); scoped delivery to the repositories of all four organizations verified (MIL-002)
Publish a repository wiki from docs/wiki/ through a called workflow Implemented as the scoped workflow .gitea/scoped_workflows/publish-wiki-pages.yml, with offline tests; it runs in every repository that has a docs/wiki/ folder, and this repository's own wiki is in docs/wiki/ (MIL-008, MIL-009)
Shared quality checks (Python and shell) Implemented as the reusable workflow .gitea/workflows/quality-checks.yml, with offline tests and a trial in a second organization; adopted in RepoFoundry (guide)
Shared quality checks (C and C++, C#) Implemented as the reusable workflows .gitea/workflows/quality-checks-cpp.yml and .gitea/workflows/quality-checks-csharp.yml with exact tool versions and offline tests; not yet used in another repository (MIL-007) (C and C++ guide, C# guide)
Code metrics and coverage badges Implemented and released in 2.1.0 as the reusable workflow .gitea/workflows/code-metrics.yml with a counter, a Cobertura reader, an SVG renderer and offline tests; tried in a throwaway repository, not yet used in a project repository (MIL-010) (guide)
Static security scan Implemented as the scoped workflow .gitea/scoped_workflows/opengrep.yml with OpenGrep, a script and offline tests; not yet run on the instance (MIL-016) (guide)
Validation of every repository Implemented as the scoped workflow .gitea/scoped_workflows/validate.yml with a script and offline tests; not yet run on the instance (MIL-017) (guide)
Publishing of accepted milestones Implemented as the scoped workflow .gitea/scoped_workflows/sync-milestones.yml with a script and offline tests, replacing the copy in .gitea/workflows/; the secrets and the private framework in a scoped run are not yet verified on the instance (MIL-019) (guide)
English comments Implemented as the reusable workflow .gitea/workflows/english-comments.yml with a comment extractor, a language detector measured on a corpus (ADR-0012), a pull request comment and offline tests; not yet run on the instance or required by any repository (MIL-013) (guide)
Versioned release and publishing Release process, changelog and upgrade guide defined; the release workflow exists and v1.0.0 is released (MIL-004) (guide)

πŸ“„ License

Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE.

πŸ”— Links

About

Reusable Gitea Actions workflows for DevOps and software engineers: mirror metadata sync today, quality checks and releases planned.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages