[FEATURE REQUEST] Modify sbom workflow to push to the repo#4621
Merged
Conversation
2524663 to
db63655
Compare
db63655 to
f96ccc5
Compare
f96ccc5 to
2a93706
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates the SBOM workflow to generate and push an sbom.json file only on pushes to the default branches, comparing it against the current master to avoid redundant commits.
- Switched from pull_request to push triggers on
masterandmain, and updated permissions towrite. - Generates, cleans, and compares the SBOM JSON against the default branch, committing only if changes are detected.
- Moves the SBOM into the repo root and streamlines the workflow steps.
Comments suppressed due to low confidence (2)
.github/workflows/sbom.yml:20
- The comment states you need the full repository history, but the checkout step lacks
fetch-depth: 0. Addfetch-depth: 0underwith:to ensure all commits are fetched for diff operations.
uses: actions/checkout@v4
.github/workflows/sbom.yml:59
- This always fetches
origin/mastereven when running onmain. To handle both branches, dynamically fetch the current branch (e.g., using${GITHUB_REF##*/}) or fetch bothorigin/masterandorigin/mainbefore comparison.
run: git fetch origin master
DeepDiver1975
approved these changes
Jul 4, 2025
joragua
requested changes
Jul 4, 2025
46d4613 to
18cb7f2
Compare
joragua
approved these changes
Jul 4, 2025
Contributor
joragua
left a comment
There was a problem hiding this comment.
LGTM! 💯 Let's see if it works in master branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
Replaced the
readpermission forwrite, since we have to pushsbom.jsonto be created when pushing tomaster. Before: in every PR, does not matter the target branch.sbom.jsonfile in root folder of the current repositoryAdded a step that will compare the
sbom.jsoninmasterwith the generated one. If they match, no push (no changes since the latest time).Related Issues
App:
ReleaseNotesViewModel.ktcreating a newReleaseNote()with String resources (if required)QA