Skip to content

Commit 7c79cf4

Browse files
authored
fix: artifacts v4 causing issue
1 parent a56bc5f commit 7c79cf4

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/actions.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,36 +32,38 @@ jobs:
3232
# jq . ${{ github.workspace }}/sbom.json
3333
depscan --bom ${{ github.workspace }}/sbom.json -o ${{ github.workspace }}/vulRep.html
3434
- name: Upload SBOM
35-
uses: actions/upload-artifact@v4
35+
uses: actions/upload-artifact@v3
3636
with:
3737
name: sbom-${{ github.run_id }}-${{ github.run_number }}.json
3838
path: ${{ github.workspace }}/sbom.json
3939
- name: Upload vdr
40-
uses: actions/upload-artifact@v4
40+
uses: actions/upload-artifact@v3
4141
with:
4242
name: vulRep-${{ github.run_id }}-${{ github.run_number }}.vdr.json
4343
path: ${{ github.workspace }}/sbom.vdr.json
4444
- name: Upload html
45-
uses: actions/upload-artifact@v4
45+
uses: actions/upload-artifact@v3
4646
with:
4747
name: vulRep-${{ github.run_id }}-${{ github.run_number }}.html
4848
path: ${{ github.workspace }}/vulRep.html
4949
- name: Install Dependency
50+
run: sudo apt-get install wkhtmltopdf
51+
- name: Generate pdf
5052
run: |
51-
sudo apt-get install -y xvfb wkhtmltopdf
52-
- name: Generate PDF
53-
run: |
54-
xvfb-run wkhtmltopdf --enable-local-file-access "file:///${{ github.workspace }}/sbom.html" "${{ github.workspace }}/sbom.pdf"
55-
xvfb-run wkhtmltopdf --enable-local-file-access "file:///${{ github.workspace }}/sbomv.html" "${{ github.workspace }}/sbomv.pdf"
56-
xvfb-run wkhtmltopdf --enable-local-file-access "file:///${{ github.workspace }}/vulRep.html" "${{ github.workspace }}/vulRep.pdf"
53+
echo "<html><body><pre>$(cat ${{ github.workspace }}/sbom.json)</pre></body></html>" > ${{ github.workspace }}/sbom.html
54+
wkhtmltopdf ${{ github.workspace }}/sbom.html ${{ github.workspace }}/sbom.pdf
55+
echo "<html><body><pre>$(cat ${{ github.workspace }}/sbom.vdr.json)</pre></body></html>" > ${{ github.workspace }}/sbomv.html
56+
wkhtmltopdf ${{ github.workspace }}/sbomv.html ${{ github.workspace }}/sbomv.pdf
57+
cat ${{ github.workspace }}/vulRep.html
58+
wkhtmltopdf ${{ github.workspace }}/vulRep.html ${{ github.workspace }}/vulRep.pdf
5759
- name: Mail Reports
5860
uses: dawidd6/action-send-mail@v3
5961
with:
6062
server_address: smtp.gmail.com
6163
server_port: 587
6264
username: ${{ secrets.GMAIL_USERNAME }}
6365
password: ${{ secrets.GMAIL_PASSWORD }}
64-
to: divyanshbisht2005@gmail.com
66+
to: divijs75@gmail.com, divyanshbisht2005@gmail.com, akashsah2003@gmail.com
6567
from: divyanshbisht2005@gmail.com
6668
subject: "Latest security reports"
6769
body: Please find the latest security reports

0 commit comments

Comments
 (0)