Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generates SBOM after source files are updated with release tag #680

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Tool Setup
uses: actions/setup-python@v2
with:
python-version: 3.7.10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we remove the python version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That version of python was no longer available in the system, also I didn't find any dependency on the python version while testing.

architecture: x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -51,7 +50,18 @@ jobs:

- 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 }}
run: |
git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }}
echo "COMMIT_SHA_1=$(git rev-parse HEAD)" >> $GITHUB_ENV

- name: Update source files with version info
run: |
# Install deps and run
pip install -r ./tools/.github/scripts/release-requirements.txt
./tools/.github/scripts/update_src_version.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit=${{ env.COMMIT_SHA_1 }} --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 }}

- name: Generate SBOM
tony-josi-aws marked this conversation as resolved.
Show resolved Hide resolved
uses: FreeRTOS/CI-CD-Github-Actions/sbom-generator@main
Expand All @@ -65,13 +75,19 @@ jobs:
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
echo "COMMIT_SHA_2=$(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=${{ env.COMMIT_SHA }} --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_2 }} --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 }}

- name: Cleanup
working-directory: ./local_kernel
run: |
# Delete the branch created for Tag by SBOM generator
git push -u origin --delete ${{ github.event.inputs.version_number }}