update worker validation

This commit is contained in:
StrangeDrVN
2026-07-14 14:11:47 +05:30
committed by GitHub
parent bf353082c5
commit 3a639f3621
+1 -22
View File
@@ -63,25 +63,4 @@ jobs:
npm run channels:validate -- ${{ steps.files.outputs.channels_all_changed_files }}
- name: Check changed workers.txt file
if: steps.files.outputs.workers_any_changed == 'true'
run: |
node -e "
const fs = require('fs');
const lines = fs.readFileSync('workers.txt', 'utf8').split('\n');
let errors = 0;
lines.forEach((line, index) => {
if (index === lines.length - 1 && !line.trim()) return;
const lineNum = index + 1;
if (!line.endsWith('\r')) {
console.error(' workers.txt\n ' + lineNum + ':1 line must use CRLF (Windows) line endings');
errors++;
}
if (line.includes(' ')) {
console.error(' workers.txt\n ' + lineNum + ':1 line cannot contain spaces');
errors++;
}
});
if (errors > 0) process.exit(1);
"
run: npm run workers:validate