4.8 KiB
Gitea Actions
The repository is hosted at https://code.brunner.ninja/feedc0de/mikrotik-olsr.
Enable Actions and provide a trusted Linux runner with the ubuntu-latest label,
Python 3.12 or later, passwordless sudo for the listed build dependencies, and
network access to the pinned source/toolchain hosts and official MikroTik downloads.
The check workflow needs no signing credentials and runs on pushes and pull requests.
Secrets
For a new publisher, generate a release keyset locally. For an existing installation, reuse its existing private keyset instead of generating another one:
python tools/routeros.py keygen --output .keys/release.json
python tools/routeros.py public-key --keys .keys/release.json --output release-public-key.json
In repository Settings -> Actions -> Secrets, add:
MIKROTIK_SIGNING_KEYSET: the complete contents of.keys/release.json.QUAY_USERNAMEandQUAY_TOKEN: credentials permitted to pushregistry.brunner.ninja/feedc0de/mikrotik-olsr.GITEA_RELEASE_TOKEN: a token authorized to create releases and upload assets for this repository, with the minimum applicable repository-write permissions.
Back up the release keyset outside the runner. Do not generate new release keys
on each run: installed devices must recognize future packages. Protect main
and limit who can modify/run the release workflow. Do not run untrusted pull
request code with release secrets.
The signing step writes the key to a private temporary file and removes it on exit. Only the public key export is included in the release output.
Run a release
Run Build NPK and container release manually on main, selecting the RouterOS
version and a new tag such as ros-7.25.1-arm-r1. The workflow builds BusyBox,
olsrd, BIRD and the service helpers, patches/signs packages and both installers,
verifies signatures/checksums, and saves a downloadable Actions artifact.
The same run also builds ARMv7 and ARM64 container archives. These are included
in the release assets together with container instructions and the interface
filter generator. Containers are development snapshots pending native forwarding
acceptance; a successful build is not a hardware certification.
Enable the publish input to push the multiarchitecture container manifest tagged
with the full source commit, then create a Gitea prerelease. A registry push
failure prevents release publication (a successful registry push cannot be
rolled back if a later release upload fails). With publication disabled,
no API release token is needed. The artifact step uses upload-artifact v3 for
Gitea compatibility. A working runner and signing secret are still required.
The uploader first creates a draft, uploads all checksummed files, and only then publishes it. A failed upload leaves a draft for inspection. It never overwrites an existing release tag automatically.
No signing secret or release token is shipped with this repository. Until those secrets and a runner are configured, the workflow definition alone cannot produce a hosted release. Hardware validation is not performed by CI, and the prerelease description explicitly records the unfinished OLSR integration.
Download page
The buildless page in site/ fetches public release metadata from the Gitea API.
Host that directory on your static web server. The server must allow browser
access to the public Gitea API (CORS for a different origin). The page also links
directly to Gitea releases when API access is unavailable. No private token belongs
in the page.
Manual first release
The local release bundle uses the keyset already installed on the test AP. Set
MIKROTIK_SIGNING_KEYSET to that same keyset for compatible CI updates. Never
commit it. In Gitea, create a prerelease targeting the exact source commit in
manifest.json, paste RELEASE-NOTES.md, and attach every file from the bundle,
including SHA256SUMS, public-key.json and runtime-sources.tar.gz. Use the tag
ros-7.25.1-arm-r1 for the first bundle. Publish only after all uploads finish.
Alternatively, after configuring API access:
python tools/publish-release.py --tag ros-7.25.1-arm-r1 \
--directory dist/ros-7.25.1-arm-r1 --token-file /path/to/private-token-file
Container-only CI
Changes to container sources, tests or the shared build script trigger
.gitea/workflows/container.yml. Pull requests build/test and save ARM archives;
main builds additionally push the commit-tagged image using the two registry
secrets. The full NPK/container release remains a manual workflow because it
requires the long-lived signing key and a unique release tag.
The keyset currently installed on the lab AP is .keys/development.json.
Use that existing keyset for this publisher's MIKROTIK_SIGNING_KEYSET; generating
a different key would make package-only updates incompatible. Never commit it.