Files
epg/scripts/create-matrix.js

10 lines
347 B
JavaScript
Raw Normal View History

2021-10-07 20:11:00 +03:00
const file = require('./file.js')
2021-10-07 17:57:27 +03:00
2021-10-07 22:59:38 +03:00
file.list('channels/**/*.xml', ['ad'], ['us-local']).then(files => {
2021-10-07 17:57:27 +03:00
const country = files.map(file => file.replace(/channels\/|\.xml/gi, ''))
const days = country.map(() => 2)
const matrix = { country, days }
const output = `::set-output name=matrix::${JSON.stringify(matrix)}`
console.log(output)
})