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
|
|
@ -479,9 +479,10 @@ let
|
|||
warns mirrorsNoController && !(warns controllerWithMirrors);
|
||||
}
|
||||
{
|
||||
# The mirror is what `self` resolves `actions/checkout` to, so the two
|
||||
# come together. The control is the same forge without the option.
|
||||
name = "actionsFromSelf adds the checkout mirror and resolves actions from the forge";
|
||||
# The mirrors are what `self` resolves `actions/*` to, so the two come
|
||||
# together: one per action `.forgejo/workflows/` names. The control is
|
||||
# the same forge without the option.
|
||||
name = "actionsFromSelf adds the actions mirrors and resolves actions from the forge";
|
||||
ok =
|
||||
let
|
||||
mirrorsOf =
|
||||
|
|
@ -489,7 +490,11 @@ let
|
|||
actionsUrlOf =
|
||||
m: m.containers.hive-forge.config.services.forgejo.settings.actions.DEFAULT_ACTIONS_URL or null;
|
||||
in
|
||||
lib.elem "actions/checkout" (map (m: m.dest) (mirrorsOf controllerWithSelfActions))
|
||||
map (m: m.dest) (mirrorsOf controllerWithSelfActions) == [
|
||||
"mirrors/tool"
|
||||
"actions/checkout"
|
||||
"actions/upload-artifact"
|
||||
]
|
||||
&& actionsUrlOf controllerWithSelfActions == "self"
|
||||
&& mirrorsOf controllerWithMirrors == [ aMirror ]
|
||||
&& actionsUrlOf controllerWithMirrors == null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue