Skip to content

Commit 6436692

Browse files
authored
chore: fix publish suppressions workflow (#7622)
1 parent f821b99 commit 6436692

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/publish-suppressions.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ jobs:
1616
with:
1717
ref: generatedSuppressions
1818
- uses: actions/setup-node@v4.4.0
19+
- run: |
20+
npm install fs
21+
- name: Create Generated Suppressions XML
22+
uses: actions/github-script@v7.0.1
23+
with:
24+
script: |
25+
const fs = require('fs');
26+
const generatedSuppressions = fs.readFileSync('generatedSuppressions.xml', 'utf8');
27+
if (!fs.existsSync('./suppressions')){
28+
fs.mkdirSync('./suppressions');
29+
}
30+
fs.appendFileSync('suppressions/publishedSuppressions.xml', '<?xml version="1.0" encoding="UTF-8"?>\n<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">' + generatedSuppressions + '\n</suppressions>', function (err) {
31+
if (err) throw err;
32+
console.log('publishedSuppressions.xml created');
33+
});
1934
- name: Publish Updated Suppressions
2035
uses: JamesIves/github-pages-deploy-action@v4.7.3
2136
with:

0 commit comments

Comments
 (0)