All checks were successful
Build App / compute-version (push) Successful in 6s
Build Container / build-container (push) Successful in 1m44s
Build App / build-macos (push) Successful in 2m21s
Build App / build-windows (push) Successful in 3m30s
Build App / build-linux (push) Successful in 4m52s
Build App / create-tag (push) Successful in 3s
Build App / sync-to-github (push) Successful in 10s
Work VPN blocks repo.anhonesthost.net, breaking update checks and image pulls. Move all user-facing distribution to GitHub (releases API) and GHCR (container images) while keeping Gitea as the source of truth for development and CI. - CI: push container images to GHCR alongside Gitea registry - App updates: switch releases API to api.github.com, filter by asset filename instead of tag suffix for unified releases - Image updates: switch registry to ghcr.io with anonymous token auth - Container pull: point REGISTRY_IMAGE to ghcr.io/shadowdao/triple-c-sandbox - Rename GiteaRelease/GiteaAsset structs to GitHubRelease/GitHubAsset Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
917 B
Rust
32 lines
917 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use super::app_settings::ImageSource;
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct ContainerInfo {
|
|
pub container_id: String,
|
|
pub project_id: String,
|
|
pub status: String,
|
|
pub image: String,
|
|
}
|
|
|
|
pub const LOCAL_IMAGE_NAME: &str = "triple-c";
|
|
pub const IMAGE_TAG: &str = "latest";
|
|
pub const REGISTRY_IMAGE: &str = "ghcr.io/shadowdao/triple-c-sandbox:latest";
|
|
|
|
pub fn local_build_image_name() -> String {
|
|
format!("{LOCAL_IMAGE_NAME}:{IMAGE_TAG}")
|
|
}
|
|
|
|
pub fn resolve_image_name(source: &ImageSource, custom: &Option<String>) -> String {
|
|
match source {
|
|
ImageSource::Registry => REGISTRY_IMAGE.to_string(),
|
|
ImageSource::LocalBuild => local_build_image_name(),
|
|
ImageSource::Custom => custom
|
|
.as_deref()
|
|
.filter(|s| !s.is_empty())
|
|
.unwrap_or(REGISTRY_IMAGE)
|
|
.to_string(),
|
|
}
|
|
}
|