diff --git a/.github/workflows/validations.yaml b/.github/workflows/validations.yaml index 8de4cf2ad..053c360c9 100644 --- a/.github/workflows/validations.yaml +++ b/.github/workflows/validations.yaml @@ -106,8 +106,14 @@ jobs: const dirs = ls(baseDir).filter(f => f.isDirectory()).map(f => f.name) const uploads = [] + // filter to only amd64 and arm64 architectures + const supportedArchs = ['amd64', 'arm64'] + const filteredDirs = dirs.filter(dir => + supportedArchs.some(arch => dir.includes(arch)) + ) + // upload platform subdirectories - for (const dir of dirs) { + for (const dir of filteredDirs) { // uploadArtifact returns Promise<{id, size}> uploads.push(artifact.uploadArtifact( // name of the archive: @@ -120,6 +126,21 @@ jobs: )) } + // upload RPM and DEB packages for supported architectures + const packageFiles = ls(baseDir).filter(f => + f.isFile() && + (f.name.endsWith('.deb') || f.name.endsWith('.rpm')) && + supportedArchs.some(arch => f.name.includes(`_${arch}.`)) + ) + for (const file of packageFiles) { + uploads.push(artifact.uploadArtifact( + file.name, + [`${baseDir}/${file.name}`], + baseDir, + { retentionDays: 30 } + )) + } + // upload checksums file (needed by install tests) const rootFiles = ls(baseDir).filter(f => f.isFile() && f.name.match(/syft_.*_checksums\.txt$/)) if (rootFiles.length > 0) {