feat: limit supported subtargets
This commit is contained in:
@@ -4,6 +4,9 @@ const core = require('@actions/core');
|
|||||||
|
|
||||||
const version = process.argv[2]; // Получение версии OpenWRT из аргумента командной строки
|
const version = process.argv[2]; // Получение версии OpenWRT из аргумента командной строки
|
||||||
|
|
||||||
|
// mediatek, ramips
|
||||||
|
const SNAPSHOT_SUBTARGETS_TO_BUILD = ['filogic', 'mt7622', 'mt7623', 'mt7629', 'mt7620', 'mt7621', 'mt76x8'];
|
||||||
|
|
||||||
if (!version) {
|
if (!version) {
|
||||||
core.setFailed('Version argument is required');
|
core.setFailed('Version argument is required');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
@@ -74,6 +77,8 @@ async function main() {
|
|||||||
const subtargets = await getSubtargets(target);
|
const subtargets = await getSubtargets(target);
|
||||||
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)) {
|
||||||
jobConfig.push({
|
jobConfig.push({
|
||||||
tag: version,
|
tag: version,
|
||||||
target,
|
target,
|
||||||
@@ -83,6 +88,8 @@ async function main() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
core.setOutput('job-config', JSON.stringify(jobConfig));
|
core.setOutput('job-config', JSON.stringify(jobConfig));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user