Skip to content

Commit aac5974

Browse files
authored
Update actions.yml
1 parent 5d9761c commit aac5974

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/actions.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,20 @@ jobs:
4949
- name: Debug File Paths
5050
run: ls -lah ${{ github.workspace }}/
5151
- name: Install Dependency
52-
run: sudo apt-get install wkhtmltopdf
53-
- name: Generate pdf
5452
run: |
55-
echo "<html><body><pre>$(cat ${{ github.workspace }}/sbom.json)</pre></body></html>" > ${{ github.workspace }}/sbom.html
56-
wkhtmltopdf --enable-local-file-access file://${{ github.workspace }}/sbom.html ${{ github.workspace }}/sbom.pdf
53+
sudo apt-get update
54+
sudo apt-get install -y xvfb wkhtmltopdf
55+
- name: Generate PDF
56+
run: |
57+
cat ${{ github.workspace }}/sbom.json | jq '.' > ${{ github.workspace }}/sbom_pretty.json
58+
echo "<html><body><pre>$(cat ${{ github.workspace }}/sbom_pretty.json)</pre></body></html>" > ${{ github.workspace }}/sbom.html
59+
xvfb-run wkhtmltopdf --enable-local-file-access file://${{ github.workspace }}/sbom.html ${{ github.workspace }}/sbom.pdf
5760
58-
echo "<html><body><pre>$(cat ${{ github.workspace }}/sbom.vdr.json)</pre></body></html>" > ${{ github.workspace }}/sbomv.html
59-
wkhtmltopdf --enable-local-file-access file://${{ github.workspace }}/sbomv.html ${{ github.workspace }}/sbomv.pdf
61+
cat ${{ github.workspace }}/sbom.vdr.json | jq '.' > ${{ github.workspace }}/sbomv_pretty.json
62+
echo "<html><body><pre>$(cat ${{ github.workspace }}/sbomv_pretty.json)</pre></body></html>" > ${{ github.workspace }}/sbomv.html
63+
xvfb-run wkhtmltopdf --enable-local-file-access file://${{ github.workspace }}/sbomv.html ${{ github.workspace }}/sbomv.pdf
6064
61-
cat ${{ github.workspace }}/vulRep.html
62-
wkhtmltopdf --enable-local-file-access file://${{ github.workspace }}/vulRep.html ${{ github.workspace }}/vulRep.pdf
65+
xvfb-run wkhtmltopdf --enable-local-file-access file://${{ github.workspace }}/vulRep.html ${{ github.workspace }}/vulRep.pdf
6366
- name: Mail Reports
6467
uses: dawidd6/action-send-mail@v3
6568
with:

0 commit comments

Comments
 (0)