iptv/scripts/create-matrix.js

10 lines
334 B
JavaScript
Raw Normal View History

2021-09-09 00:22:20 +02:00
const file = require('./helpers/file')
file.list().then(files => {
2021-09-09 00:32:42 +02:00
files = files.filter(file => file !== 'channels/unsorted.m3u')
2021-09-09 00:22:20 +02:00
const country = files.map(file => file.replace(/channels\/|\.m3u/gi, ''))
const matrix = { country }
const output = `::set-output name=matrix::${JSON.stringify(matrix)}`
console.log(output)
})