mirror of https://github.com/iptv-org/iptv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
400 B
JavaScript
16 lines
400 B
JavaScript
const { logger, db } = require('../core')
|
|
|
|
async function main() {
|
|
const docs = await db.find({}).sort({ cluster_id: 1 })
|
|
const cluster_id = docs.reduce((acc, curr) => {
|
|
if (!acc.includes(curr.cluster_id)) acc.push(curr.cluster_id)
|
|
return acc
|
|
}, [])
|
|
|
|
const matrix = { cluster_id }
|
|
const output = `::set-output name=matrix::${JSON.stringify(matrix)}`
|
|
logger.info(output)
|
|
}
|
|
|
|
main()
|