This commit is contained in:
@@ -3,7 +3,7 @@ name: Publish container image
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: git.krtss.de
|
REGISTRY: git.krtss.de
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ has a connected provider. The worker leaves jobs queued while the runtime is una
|
|||||||
|
|
||||||
### Image publishing
|
### Image publishing
|
||||||
|
|
||||||
Every push to `master` runs `.gitea/workflows/publish-image.yaml` and publishes the image as both
|
Every push to `main` runs `.gitea/workflows/publish-image.yaml` and publishes the image as both
|
||||||
`git.krtss.de/stanponomarev/agentci:latest` and
|
`git.krtss.de/stanponomarev/agentci:latest` and
|
||||||
`git.krtss.de/stanponomarev/agentci:<full-commit-sha>`. Configure these repository Actions secrets
|
`git.krtss.de/stanponomarev/agentci:<full-commit-sha>`. Configure these repository Actions secrets
|
||||||
before the first run:
|
before the first run:
|
||||||
|
|||||||
@@ -156,11 +156,11 @@ def test_compose_has_no_sandbox_security_exceptions() -> None:
|
|||||||
assert forbidden not in compose
|
assert forbidden not in compose
|
||||||
|
|
||||||
|
|
||||||
def test_gitea_workflow_publishes_master_images() -> None:
|
def test_gitea_workflow_publishes_main_images() -> None:
|
||||||
lines = (ROOT / ".gitea" / "workflows" / "publish-image.yaml").read_text().splitlines()
|
lines = (ROOT / ".gitea" / "workflows" / "publish-image.yaml").read_text().splitlines()
|
||||||
push = _section(_section(lines, "on", indent=0), "push", indent=2)
|
push = _section(_section(lines, "on", indent=0), "push", indent=2)
|
||||||
|
|
||||||
assert _sequence(push, "branches", indent=4) == ["master"]
|
assert _sequence(push, "branches", indent=4) == ["main"]
|
||||||
assert _mapping(lines, "env", indent=0)["IMAGE_NAME"] == (
|
assert _mapping(lines, "env", indent=0)["IMAGE_NAME"] == (
|
||||||
"git.krtss.de/stanponomarev/agentci"
|
"git.krtss.de/stanponomarev/agentci"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user