File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : SBOM with tag release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+
8
+ jobs :
9
+ run_on_release :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout code
13
+ uses : actions/checkout@v2
14
+ - name : Run script on release
15
+ run : |
16
+ echo "New release created: ${{ github.event.release.tag_name }}"
17
+ # Run your desired script or command here
18
+ pip install cyclonedx-bom
19
+ cyclonedx-py -r -i ../logicmonitor_data_sdk_py/requirements.txt --format json -o sbom.json
20
+ # ls
21
+ # - name: Upload a Build Artifact
22
+ # uses: actions/upload-artifact@v3.1.2
23
+ # with:
24
+ # # Artifact name
25
+ # name: sbom_report
26
+ # # A file, directory or wildcard pattern that describes what to upload
27
+ # path: sbom.json
28
+ # # - name: release
29
+ # uses: actions/create-release@v1
30
+ # id: create_release
31
+ # with:
32
+ # draft: false
33
+ # prerelease: false
34
+ # release_name: ${{ steps.version.outputs.version }}
35
+ # tag_name: ${{ github.ref }}
36
+ # #body_path: sbom.json
37
+ # env:
38
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39
+
40
+ - name : Upload files to a GitHub release
41
+ uses : svenstaro/upload-release-action@2.5.0
42
+ with :
43
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
44
+ file : sbom.json
45
+ asset_name : sbom.json
46
+ tag : ${{ github.ref }}
47
+ overwrite : true
48
+ body : " SBOM for release"
49
+
50
+
51
+
You can’t perform that action at this time.
0 commit comments