-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (56 loc) · 1.96 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on:
push:
branches: [ master ]
tags:
- "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Build with Maven
run: cd stackrox-container-image-scanner && ./mvnw -B package hpi:hpi cyclonedx:makeAggregateBom
- uses: release-drafter/release-drafter@v5
id: release_drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset Linux
id: upload-release-asset-linux
uses: gfreezy/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.release_drafter.outputs.id }}
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: stackrox-container-image-scanner/target/stackrox-container-image-scanner.hpi
asset_name: stackrox-container-image-scanner.hpi
asset_content_type: application/octet-stream
- name: Upload SBOM XML Asset Linux
id: upload-sbom-xml
uses: gfreezy/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.release_drafter.outputs.id }}
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: stackrox-container-image-scanner/target/bom.xml
asset_name: bom.xml
asset_content_type: text/xml
- name: Upload SBOM JSON Asset Linux
id: upload-sbom-json
uses: gfreezy/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.release_drafter.outputs.id }}
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: stackrox-container-image-scanner/target/bom.json
asset_name: bom.json
asset_content_type: application/json