File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 12
12
- name : Use Node.js
13
13
uses : actions/setup-node@v4
14
14
- run : npm install
15
- - run : node lib/comment.js | tee -a results.txt
15
+ - run : |
16
+ node lib/comment.js | tee -a results.txt
16
17
- name : Comment PR
17
18
uses : marocchino/sticky-pull-request-comment@v2
18
19
with :
19
20
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() {
82
82
const version = newPlugins [ name ] ;
83
83
const links = getVendors ( { ...value , version, minified : file } ) ;
84
84
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 ( ) ) ;
88
87
}
89
88
}
You can’t perform that action at this time.
0 commit comments