mirror of
https://github.com/FreeRTOS/coreMQTT
synced 2025-06-16 06:44:03 +08:00
Add SBOM Generation in release.yml (#195)
This commit is contained in:
parent
7ec05d4d7e
commit
a2dddd65f6
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@ -42,7 +42,7 @@ jobs:
|
|||||||
echo "Deleting existing release for $VERSION_NUM"
|
echo "Deleting existing release for $VERSION_NUM"
|
||||||
gh release delete --yes $VERSION_NUM
|
gh release delete --yes $VERSION_NUM
|
||||||
fi
|
fi
|
||||||
tag-commit:
|
add-sbom-and-tag-commit:
|
||||||
if: ${{ ( github.event.inputs.delete_existing_tag_release == 'true' && success() ) || ( github.event.inputs.delete_existing_tag_release == 'false' && always() ) }}
|
if: ${{ ( github.event.inputs.delete_existing_tag_release == 'true' && success() ) || ( github.event.inputs.delete_existing_tag_release == 'false' && always() ) }}
|
||||||
needs: clean-existing-tag-and-release
|
needs: clean-existing-tag-and-release
|
||||||
name: Tag commit
|
name: Tag commit
|
||||||
@ -54,7 +54,20 @@ jobs:
|
|||||||
ref: ${{ github.event.inputs.commit_id }}
|
ref: ${{ github.event.inputs.commit_id }}
|
||||||
- name: Configure git identity
|
- name: Configure git identity
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "Release Workflow"
|
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
|
||||||
|
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: ./
|
||||||
|
source_path: ./source
|
||||||
|
- name: commit SBOM file
|
||||||
|
run: |
|
||||||
|
git add .
|
||||||
|
git commit -m 'Update SBOM'
|
||||||
|
git push -u origin ${{ github.event.inputs.version_number }}
|
||||||
- name: Tag Commit and Push to remote
|
- name: Tag Commit and Push to remote
|
||||||
run: |
|
run: |
|
||||||
git tag ${{ github.event.inputs.version_number }} -a -m "coreMQTT Library ${{ github.event.inputs.version_number }}"
|
git tag ${{ github.event.inputs.version_number }} -a -m "coreMQTT Library ${{ github.event.inputs.version_number }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user