Skip to content

Commit

Permalink
Add SBOM Generation in auto_release.yml (FreeRTOS#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlin7799 authored Jul 28, 2022
1 parent 349e803 commit c22f40d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
default: '10.4.4'
main_br_version:
description: "Version String for task.h on main branch (leave empty to leave as-is)."
require: false
required: false
default: ''

jobs:
Expand Down Expand Up @@ -44,14 +44,34 @@ jobs:
path: local_kernel
fetch-depth: 0

- name: Release
- name: Configure git identity
run: |
# Configure repo for push
git config --global user.name ${{ github.actor }}
git config --global user.email ${{ github.actor }}@users.noreply.github.com
- name: create a new branch that references commit id
working-directory: ./local_kernel
run: git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }}

- name: Generate SBOM
uses: FreeRTOS/CI-CD-Github-Actions/sbom-generator@main
with:
repo_path: ./local_kernel
source_path: ./

- name: commit SBOM file
working-directory: ./local_kernel
run: |
git add .
git commit -m 'Update SBOM'
git push -u origin ${{ github.event.inputs.version_number }}
echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Release
run: |
# Install deps and run
pip install -r ./tools/.github/scripts/release-requirements.txt
./tools/.github/scripts/release.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit=${{ github.event.inputs.commit_id }} --new-kernel-version=${{ github.event.inputs.version_number }} --new-kernel-main-br-version=${{ github.event.inputs.main_br_version }}
./tools/.github/scripts/release.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit=${{ env.COMMIT_SHA }} --new-kernel-version=${{ github.event.inputs.version_number }} --new-kernel-main-br-version=${{ github.event.inputs.main_br_version }}
exit $?
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name : "FreeRTOS-Kernel"
version: "v10.4.6"
description: "FreeRTOS Kernel."
license: "MIT"

0 comments on commit c22f40d

Please sign in to comment.