mirror of
https://github.com/Slava-Shchipunov/awg-openwrt.git
synced 2026-03-14 01:13:09 +00:00
feat: add target filter to snapshots
This commit is contained in:
4
index.js
4
index.js
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user