Skip to content

Commit

Permalink
Generate sbom
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Jul 10, 2024
1 parent 8d1df88 commit 779ae2b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ jobs:
env:
PYTHONPATH: .
TEST_VDB_HOME: vdb_data
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Generate SBOM with cdxgen
run: |
sudo npm install -g @cyclonedx/cdxgen
cdxgen -t python -o bom.json . -p
26 changes: 18 additions & 8 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Create Release
id: create_release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
python3 -m build
- name: Publish package distributions to PyPI
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1

- name: Generate SBOM with cdxgen
run: |
sudo npm install -g @cyclonedx/cdxgen
cdxgen -t python -o bom.json .
- name: Create Release
id: create_release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
bom.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 779ae2b

Please sign in to comment.