File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1212 - name : Use Node.js
1313 uses : actions/setup-node@v4
1414 - run : npm install
15- - run : node lib/comment.js | tee -a results.txt
15+ - run : |
16+ node lib/comment.js | tee -a results.txt
1617 - name : Comment PR
1718 uses : marocchino/sticky-pull-request-comment@v2
1819 with :
1920 path : results.txt
21+ - uses : actions/github-script@v3
22+ with :
23+ script : |
24+ const fs = require('fs');
25+ const fileContent = fs.readFileSync('results.txt', 'utf8');
26+ if (fileContent.includes('❌')) {
27+ core.setFailed('CDN check failed!')
28+ }
Original file line number Diff line number Diff line change @@ -82,8 +82,7 @@ async function printCDNTable() {
8282 const version = newPlugins [ name ] ;
8383 const links = getVendors ( { ...value , version, minified : file } ) ;
8484 const integrity = await ssri
85- . fromStream ( fs . createReadStream ( `./node_modules/${ name } /${ file } ` ) , { algorithms : [ 'sha256' ] } )
86- . toString ( ) ;
87- await formatTable ( key , links , integrity ) ;
85+ . fromStream ( fs . createReadStream ( `./node_modules/${ name } /${ file } ` ) , { algorithms : [ 'sha256' ] } ) ;
86+ await formatTable ( key , links , integrity . toString ( ) ) ;
8887 }
8988}
You can’t perform that action at this time.
0 commit comments