fix(ci): accept the static image's compound license label (#3174)

This commit is contained in:
Hampus
2026-10-03 18:20:58 +02:00
committed by GitHub
parent e7347b582c
commit 3e9ee908f8
+11 -2
View File
@@ -336,8 +336,7 @@ mod tests {
#[test] #[test]
fn image_dockerfiles_include_the_release_label_block() { fn image_dockerfiles_include_the_release_label_block() {
const REQUIRED: [&str; 9] = [ const REQUIRED: [&str; 8] = [
"LABEL org.opencontainers.image.licenses=\"AGPL-3.0-or-later\"",
"LABEL org.opencontainers.image.vendor=\"Fluxer\"", "LABEL org.opencontainers.image.vendor=\"Fluxer\"",
"LABEL org.opencontainers.image.url=\"https://fluxer.app\"", "LABEL org.opencontainers.image.url=\"https://fluxer.app\"",
"LABEL org.opencontainers.image.documentation=\"https://docs.fluxer.app\"", "LABEL org.opencontainers.image.documentation=\"https://docs.fluxer.app\"",
@@ -427,6 +426,16 @@ mod tests {
dockerfile.contains(&format!("LABEL org.opencontainers.image.title=\"{title}\"")), dockerfile.contains(&format!("LABEL org.opencontainers.image.title=\"{title}\"")),
"{name}/Dockerfile must declare the title {title}" "{name}/Dockerfile must declare the title {title}"
); );
let licenses = match name {
"fluxer_static" => "AGPL-3.0-or-later AND CC-BY-SA-4.0 AND CC-BY-4.0",
_ => "AGPL-3.0-or-later",
};
assert!(
dockerfile.contains(&format!(
"LABEL org.opencontainers.image.licenses=\"{licenses}\""
)),
"{name}/Dockerfile must declare the licenses {licenses}"
);
for label in REQUIRED { for label in REQUIRED {
assert!( assert!(
dockerfile.contains(label), dockerfile.contains(label),