merge develop into release
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-09 15:43:54 +09:00
@@ -47,9 +47,13 @@ function releaseBuildComponentTypes(imageTags: ImageTags | null | undefined) {
return map;
}
function isReleaseArtifactVisible(componentName: string, componentTypes: Map<string, string>) {
function isRuntimeOnlyImage(value: string) {
return /^(postgres|redis|mysql|mariadb|mongo|nginx|rabbitmq)(:|@)/i.test(value.trim());
}
function isReleaseArtifactVisible(componentName: string, value: string, componentTypes: Map<string, string>) {
const type = componentTypes.get(componentName);
return type !== 'DATABASE' && type !== 'MIGRATION';
return type !== 'DATABASE' && type !== 'MIGRATION' && !isRuntimeOnlyImage(value);
}
function releaseArtifacts(release: AppRelease) {
@@ -57,10 +61,10 @@ function releaseArtifacts(release: AppRelease) {
const componentTypes = releaseBuildComponentTypes(imageTags);
const values = [
...Object.entries(imageTags?.images ?? {})
.filter(([componentName]) => isReleaseArtifactVisible(componentName, componentTypes))
.filter(([componentName, value]) => isReleaseArtifactVisible(componentName, value, componentTypes))
.map(([, value]) => value),
...Object.entries(imageTags?.artifacts ?? {})
.filter(([componentName]) => isReleaseArtifactVisible(componentName, componentTypes))
.filter(([componentName, value]) => isReleaseArtifactVisible(componentName, value, componentTypes))
.map(([, value]) => value)
].filter(Boolean);
@@ -160,8 +164,8 @@ function nextReleaseVersion(releases: AppRelease[], appId: string, builds: Build
function buildCount(release: AppRelease) {
const imageTags = release.imageTags as ImageTags | null | undefined;
const componentTypes = releaseBuildComponentTypes(imageTags);
const count = Object.keys(imageTags?.images ?? {}).filter((componentName) => isReleaseArtifactVisible(componentName, componentTypes)).length
+ Object.keys(imageTags?.artifacts ?? {}).filter((componentName) => isReleaseArtifactVisible(componentName, componentTypes)).length;
const count = Object.entries(imageTags?.images ?? {}).filter(([componentName, value]) => isReleaseArtifactVisible(componentName, value, componentTypes)).length
+ Object.entries(imageTags?.artifacts ?? {}).filter(([componentName, value]) => isReleaseArtifactVisible(componentName, value, componentTypes)).length;
return count || (release.artifact ? 1 : 0);
}