Skip to content

Commit efe1b51

Browse files
authored
Add SBOM Generation in release.yml (#116)
* Update sbom * Update license
1 parent 7901c27 commit efe1b51

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
tag-commit:
4646
if: ${{ ( github.event.inputs.delete_existing_tag_release == 'true' && success() ) || ( github.event.inputs.delete_existing_tag_release == 'false' && always() ) }}
4747
needs: clean-existing-tag-and-release
48-
name: Tag commit
48+
name: Generate SBOM and tag commit
4949
runs-on: ubuntu-latest
5050
steps:
5151
- name: Checkout code
@@ -54,7 +54,20 @@ jobs:
5454
ref: ${{ github.event.inputs.commit_id }}
5555
- name: Configure git identity
5656
run: |
57-
git config --global user.name "Release Workflow"
57+
git config --global user.name ${{ github.actor }}
58+
git config --global user.email ${{ github.actor }}@users.noreply.github.com
59+
- name: create a new branch that references commit id
60+
run: git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }}
61+
- name: Generate SBOM
62+
uses: FreeRTOS/CI-CD-Github-Actions/sbom-generator@main
63+
with:
64+
repo_path: ./
65+
source_path: ./source
66+
- name: commit SBOM file
67+
run: |
68+
git add .
69+
git commit -m 'Update SBOM'
70+
git push -u origin ${{ github.event.inputs.version_number }}
5871
- name: Tag Commit and Push to remote
5972
run: |
6073
git tag ${{ github.event.inputs.version_number }} -a -m "coreMQTT-Agent Library ${{ github.event.inputs.version_number }}"

manifest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ license: "MIT"
66
dependencies:
77
- name : "coreMQTT"
88
version: "v2.3.1"
9+
license: "MIT"
910
repository:
1011
type: "git"
1112
url: "https://github.com/FreeRTOS/coreMQTT/"
1213
path: source/dependency/coreMQTT
1314

1415
- name: "CMock"
1516
version: "v2.5.3"
17+
license: "MIT"
1618
repository:
1719
type: "git"
1820
url: " https://github.com/ThrowTheSwitch/CMock.git"

0 commit comments

Comments
 (0)