Release: use independent component repositories
This commit is contained in:
1 parent
8c69efc56f
commit
f78004e822
26 files changed
+571
-49
No files matched your search
+34
-6
@@ -47,7 +47,7 @@ Never work around a rotation by disabling strict host-key checking.
|
||||
The Docker-capable runner executes only protected `main` pushes, manual runs,
|
||||
scheduled nightlies, and signed release tags. The container CI workflow does
|
||||
not run for pull requests because contributor-controlled scripts must not
|
||||
receive a privileged Docker socket or the private-submodule checkout key. If
|
||||
receive a privileged Docker socket or release checkout credentials. If
|
||||
pre-merge CI is required, register a separate ephemeral `echoion-pr` runner
|
||||
without release secrets or host-level Docker access and give it a dedicated
|
||||
workflow. A global runner such as the default installation shown in Gitea must
|
||||
@@ -58,14 +58,42 @@ Enable Actions and add these repository secrets:
|
||||
|
||||
| Secret | Purpose |
|
||||
| --- | --- |
|
||||
| `RELEASE_CHECKOUT_SSH_KEY` | Read-only deploy key that can clone every private nested repository in `.gitmodules`. |
|
||||
| `RELEASE_BOT_TOKEN` | PAT owned by a dedicated bot, limited to writing releases, tags, and the `release-feed` branch in this repository. |
|
||||
| `RELEASE_CHECKOUT_SSH_KEY` | Read-only key used for the root checkout. |
|
||||
| `RELEASE_BOT_TOKEN` | PAT owned by a dedicated bot. It needs read access to the component repositories plus release/tag and `release-feed` write access in this repository. |
|
||||
| `RELEASE_TAG_ALLOWED_SIGNERS` | Complete OpenSSH `allowed_signers` lines for maintainers allowed to publish `v*` tags. |
|
||||
| `RELEASE_FEED_ED25519_PRIVATE_KEY` | PEM private key matching `release-keys/echoion-release-2026-07.pub.pem`. Preserve its newlines. |
|
||||
|
||||
The release PAT must not be shared with checkout of nested repositories. The
|
||||
feed signing key must not be stored in Git, runner images, Actions variables,
|
||||
or release assets.
|
||||
Component checkouts use the release PAT with `persist-credentials: false`, so
|
||||
the credential is removed before repository scripts run. The feed signing key
|
||||
must not be stored in Git, runner images, Actions variables, or release assets.
|
||||
|
||||
## Independent component repositories
|
||||
|
||||
Echoion does not use Git submodules. `components.lock.json` is the immutable
|
||||
checkout manifest for `EchoionApi`, `EchoionCore`, and `EchoionDesktop`. CMake
|
||||
uses a component already present beside the root checkout; otherwise it fetches
|
||||
the locked revision. All three Gitea workflows check out those revisions as
|
||||
ordinary repositories before entering Docker.
|
||||
|
||||
For a new developer checkout:
|
||||
|
||||
```bash
|
||||
python3 scripts/sync-components.py
|
||||
```
|
||||
|
||||
After changing a component, commit and push that component first, then refresh
|
||||
and commit the root lock:
|
||||
|
||||
```bash
|
||||
python3 scripts/sync-components.py --record
|
||||
git add components.lock.json
|
||||
```
|
||||
|
||||
`--record` refuses dirty component repositories, so a lock can never point at
|
||||
uncommitted source. `--update` moves existing clean component checkouts to the
|
||||
locked revisions. Product version changes are separate: edit only
|
||||
`project(Echoion VERSION ...)` in root `CMakeLists.txt`; orchestrated component
|
||||
builds and release overrides inherit that value.
|
||||
|
||||
Create an orphan `release-feed` branch containing a tracked `feeds/`
|
||||
directory, then protect it so only the release bot can push. Protect the `v*`
|
||||
|
||||
+53
-2
@@ -22,17 +22,68 @@ jobs:
|
||||
docker version
|
||||
docker info
|
||||
|
||||
- name: Check out source and nested repositories
|
||||
- name: Check out source
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
ssh-key: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
|
||||
ssh-user: gitea
|
||||
ssh-known-hosts: >-
|
||||
git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw==
|
||||
persist-credentials: false
|
||||
|
||||
- name: Read locked component repositories
|
||||
id: components
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python3 - "$GITHUB_OUTPUT" <<'PY'
|
||||
import json
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
lock = json.loads(pathlib.Path("components.lock.json").read_text())
|
||||
with pathlib.Path(sys.argv[1]).open("a") as output:
|
||||
for component, key in (
|
||||
("EchoionApi", "api"),
|
||||
("EchoionCore", "core"),
|
||||
("EchoionDesktop", "desktop"),
|
||||
):
|
||||
entry = lock["components"][component]
|
||||
print(f"{key}_repository={entry['repository']}", file=output)
|
||||
print(f"{key}_revision={entry['revision']}", file=output)
|
||||
PY
|
||||
|
||||
- name: Check out EchoionApi
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.api_repository }}
|
||||
ref: ${{ steps.components.outputs.api_revision }}
|
||||
path: EchoionApi
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check out EchoionCore
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.core_repository }}
|
||||
ref: ${{ steps.components.outputs.core_revision }}
|
||||
path: EchoionCore
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check out EchoionDesktop
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.desktop_repository }}
|
||||
ref: ${{ steps.components.outputs.desktop_revision }}
|
||||
path: EchoionDesktop
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Build, test, and package without starting Echoion
|
||||
env:
|
||||
CI_VERSION: 0.0.0-ci.${{ gitea.run_number }}.${{ gitea.run_attempt }}
|
||||
|
||||
@@ -21,18 +21,69 @@ jobs:
|
||||
docker version
|
||||
docker info
|
||||
|
||||
- name: Check out main and nested repositories
|
||||
- name: Check out main
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
ssh-key: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
|
||||
ssh-user: gitea
|
||||
ssh-known-hosts: >-
|
||||
git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw==
|
||||
persist-credentials: false
|
||||
|
||||
- name: Read locked component repositories
|
||||
id: components
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python3 - "$GITHUB_OUTPUT" <<'PY'
|
||||
import json
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
lock = json.loads(pathlib.Path("components.lock.json").read_text())
|
||||
with pathlib.Path(sys.argv[1]).open("a") as output:
|
||||
for component, key in (
|
||||
("EchoionApi", "api"),
|
||||
("EchoionCore", "core"),
|
||||
("EchoionDesktop", "desktop"),
|
||||
):
|
||||
entry = lock["components"][component]
|
||||
print(f"{key}_repository={entry['repository']}", file=output)
|
||||
print(f"{key}_revision={entry['revision']}", file=output)
|
||||
PY
|
||||
|
||||
- name: Check out EchoionApi
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.api_repository }}
|
||||
ref: ${{ steps.components.outputs.api_revision }}
|
||||
path: EchoionApi
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check out EchoionCore
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.core_repository }}
|
||||
ref: ${{ steps.components.outputs.core_revision }}
|
||||
path: EchoionCore
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check out EchoionDesktop
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.desktop_repository }}
|
||||
ref: ${{ steps.components.outputs.desktop_revision }}
|
||||
path: EchoionDesktop
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Derive the nightly identity
|
||||
shell: bash
|
||||
env:
|
||||
@@ -160,6 +211,12 @@ jobs:
|
||||
python3 scripts/aggregate_update_feed.py \
|
||||
--new-payload \
|
||||
"dist/echoion-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
|
||||
--new-payload \
|
||||
"dist/echoion-core-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
|
||||
--new-payload \
|
||||
"dist/url-shortener-internal-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
|
||||
--new-payload \
|
||||
"dist/url-shortener-external-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
|
||||
"${existing[@]}" \
|
||||
--public-key \
|
||||
.gitea/release-keys/echoion-release-2026-07.pub.pem \
|
||||
|
||||
@@ -26,13 +26,64 @@ jobs:
|
||||
with:
|
||||
ref: ${{ gitea.ref }}
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
ssh-key: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
|
||||
ssh-user: gitea
|
||||
ssh-known-hosts: >-
|
||||
git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw==
|
||||
persist-credentials: false
|
||||
|
||||
- name: Read locked component repositories
|
||||
id: components
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python3 - "$GITHUB_OUTPUT" <<'PY'
|
||||
import json
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
lock = json.loads(pathlib.Path("components.lock.json").read_text())
|
||||
with pathlib.Path(sys.argv[1]).open("a") as output:
|
||||
for component, key in (
|
||||
("EchoionApi", "api"),
|
||||
("EchoionCore", "core"),
|
||||
("EchoionDesktop", "desktop"),
|
||||
):
|
||||
entry = lock["components"][component]
|
||||
print(f"{key}_repository={entry['repository']}", file=output)
|
||||
print(f"{key}_revision={entry['revision']}", file=output)
|
||||
PY
|
||||
|
||||
- name: Check out EchoionApi
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.api_repository }}
|
||||
ref: ${{ steps.components.outputs.api_revision }}
|
||||
path: EchoionApi
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check out EchoionCore
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.core_repository }}
|
||||
ref: ${{ steps.components.outputs.core_revision }}
|
||||
path: EchoionCore
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check out EchoionDesktop
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: ${{ steps.components.outputs.desktop_repository }}
|
||||
ref: ${{ steps.components.outputs.desktop_revision }}
|
||||
path: EchoionDesktop
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Verify protected annotated SSH tag
|
||||
shell: bash
|
||||
env:
|
||||
@@ -168,6 +219,12 @@ jobs:
|
||||
python3 scripts/aggregate_update_feed.py \
|
||||
--new-payload \
|
||||
"dist/echoion-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
|
||||
--new-payload \
|
||||
"dist/echoion-core-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
|
||||
--new-payload \
|
||||
"dist/url-shortener-internal-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
|
||||
--new-payload \
|
||||
"dist/url-shortener-external-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
|
||||
"${existing[@]}" \
|
||||
--public-key \
|
||||
.gitea/release-keys/echoion-release-2026-07.pub.pem \
|
||||
|
||||
Reference in new issue
Block a user