feat: add target filter to snapshots

This commit is contained in:
Svyatoslav Shchipunov
2024-09-23 10:33:12 +07:00
parent a4dad7e585
commit 922f929ad0

View File

@@ -4,7 +4,7 @@ const core = require('@actions/core');
const version = process.argv[2]; // Получение версии OpenWRT из аргумента командной строки const version = process.argv[2]; // Получение версии OpenWRT из аргумента командной строки
// mediatek, ramips, x86, armsr const SNAPSHOT_TARGETS_TO_BUILD = ['mediatek', 'ramips', 'x86', 'armsr'];
const SNAPSHOT_SUBTARGETS_TO_BUILD = ['filogic', 'mt7622', 'mt7623', 'mt7629', 'mt7620', 'mt7621', 'mt76x8', '64', 'generic', 'armv8']; const SNAPSHOT_SUBTARGETS_TO_BUILD = ['filogic', 'mt7622', 'mt7623', 'mt7629', 'mt7620', 'mt7621', 'mt76x8', '64', 'generic', 'armv8'];
if (!version) { if (!version) {
@@ -78,7 +78,7 @@ async function main() {
for (const subtarget of subtargets) { for (const subtarget of subtargets) {
const { vermagic, pkgarch } = await getDetails(target, subtarget); const { vermagic, pkgarch } = await getDetails(target, subtarget);
if (version !== 'SNAPSHOT' || SNAPSHOT_SUBTARGETS_TO_BUILD.includes(subtarget)) { if (version !== 'SNAPSHOT' || (SNAPSHOT_SUBTARGETS_TO_BUILD.includes(subtarget) && SNAPSHOT_TARGETS_TO_BUILD.includes(target))) {
jobConfig.push({ jobConfig.push({
tag: version, tag: version,
target, target,