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.
iptv/scripts/create-matrix.js

10 lines
334 B
JavaScript

const file = require('./helpers/file')
file.list().then(files => {
files = files.filter(file => file !== 'channels/unsorted.m3u')
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)
})