hive-forge: mirror actions/upload-artifact alongside actions/checkout
With actionsFromSelf, Forgejo resolves bare `uses: actions/<name>` against
the forge itself, so every action a workflow names needs a mirror there.
Only actions/checkout was seeded, and coverage.yml's
`actions/upload-artifact@v3` has failed at job setup with "repository not
found" since the CI runner moved to swarm-ci-runner (e2da5509).
The single hardcoded checkout mirror becomes a list of action names both
share, mirrored from github.com/actions/* like checkout already was. v3
points at the same commit (ff15f03) on github.com and code.forgejo.org.
The controller's forge-objects pass creates any missing mirror on every
pass, and the changed SWARM_CONTROLLER_FORGE_MIRRORS env restarts the unit
on switch, so an existing forge picks the mirror up on deploy.
Closes #5040
This commit is contained in:
parent
b874d21cda
commit
9b711d5ffa
5 changed files with 51 additions and 37 deletions
|
|
@ -201,25 +201,27 @@ the forge admin panel as offline until an admin deletes it. The runner the old
|
|||
under its own name and token. Delete it under Site administration, Actions,
|
||||
Runners.
|
||||
|
||||
## Actions checkout mirror
|
||||
## Actions mirrors
|
||||
|
||||
<!-- vale write-good.Passive = NO -->
|
||||
|
||||
With `services.hyperhive.deploy.forgejo.actionsFromSelf` enabled, the swarm
|
||||
controller seeds an `actions/checkout` pull-mirror on the forge and Forgejo's
|
||||
`DEFAULT_ACTIONS_URL` points at the forge itself. CI
|
||||
`uses: actions/checkout@vN` steps then resolve on the forge, with no external
|
||||
DNS on the CI critical path.
|
||||
controller seeds `actions/checkout` and `actions/upload-artifact` pull-mirrors
|
||||
(from `github.com/actions/*`) on the forge and Forgejo's `DEFAULT_ACTIONS_URL`
|
||||
points at the forge itself. CI `uses: actions/<name>@vN` steps then resolve on
|
||||
the forge, with no external DNS on the CI critical path. A workflow that names
|
||||
any other bare `actions/*` action fails at job setup with "repository not
|
||||
found" until that action joins the list in `nix/host-modules/hive-forge/default.nix`.
|
||||
|
||||
A forge host that runs the swarm controller therefore resolves
|
||||
`uses: actions/checkout` from itself, with or without a runner on that host.
|
||||
A forge host that runs the swarm controller therefore resolves those actions
|
||||
from itself, with or without a runner on that host.
|
||||
Set `actionsFromSelf = false` there to resolve actions from `data.forgejo.org`
|
||||
and seed no mirror.
|
||||
|
||||
The option defaults to whether the forge's host also runs the swarm controller
|
||||
(`services.hyperhive.deploy.swarm-controller.enable`): on when it does, off
|
||||
otherwise. Setting it `true` on a forge host without the controller leaves
|
||||
`actions/checkout` unresolved, because nothing seeds the mirror; evaluation
|
||||
the actions unresolved, because nothing seeds the mirrors; evaluation
|
||||
warns about it.
|
||||
|
||||
<!-- vale write-good.Passive = YES -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue