Report whether the image's repo is public on (Docker Hub, GHCR). Each element is True (public), False (private/absent), or None (could not determine). Non-publishable images are reported as public on both, since they are never pushed and so the check does not apply to them.
(self)
| 1200 | return False |
| 1201 | |
| 1202 | def is_public(self) -> tuple[bool | None, bool | None]: |
| 1203 | """Report whether the image's repo is public on (Docker Hub, GHCR). |
| 1204 | |
| 1205 | Each element is True (public), False (private/absent), or None (could |
| 1206 | not determine). Non-publishable images are reported as public on both, |
| 1207 | since they are never pushed and so the check does not apply to them. |
| 1208 | """ |
| 1209 | if not self.publish: |
| 1210 | return (True, True) |
| 1211 | spec = self.spec() |
| 1212 | if spec.startswith(GHCR_PREFIX): |
| 1213 | spec = spec.removeprefix(GHCR_PREFIX) |
| 1214 | ghcr_spec = f"{GHCR_PREFIX}{spec}" |
| 1215 | return (is_docker_image_public(spec), is_ghcr_image_public(ghcr_spec)) |
| 1216 | |
| 1217 | def run( |
| 1218 | self, |
nothing calls this directly
no test coverage detected