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

improvement: split generate SBOM & check licenses #7

Merged

Conversation

NyanKiyoshi
Copy link
Member

This splits the SBOM & License Check jobs into a re-usable workflow in order to make it easier to run these two tasks together.

This is needed in order to not introduce lots of duplications (and complexity) when we will be implementing differential checking (base branch vs head branch), as we will be able to trigger the run-generate-sbom-and-check-licenses.yaml workflow both on base and head with only a few lines (instead of having many lines in order to generate SBOM, check licenses, etc.)

There are no changes in run-generate-sbom-and-check-licenses.yaml except the addition of is_same_repository in order to simplify the checks, e.g.:

Before:

if: ${{ endsWith(github.repository, /saleor-internal-actions) }}
# ...
if: ${{ !endsWith(github.repository, /saleor-internal-actions) }}

After:

if: ${{ inputs.is_same_repository }}
# ...
if: ${{ !inputs.is_same_repository }}

@NyanKiyoshi NyanKiyoshi added the enhancement New feature or request label Oct 11, 2024
@NyanKiyoshi NyanKiyoshi self-assigned this Oct 11, 2024
Copy link

github-actions bot commented Oct 11, 2024

License Name Package Count Packages
<<missing>> 1
Packages
  • saleor-internal-actions
Apache-2.0 1
Packages
  • packaging
PSF-2.0 1
Packages
  • typing-extensions
0BSD 4
Packages
  • colorama
  • Jinja2
  • MarkupSafe
  • packaging
MIT 6
Packages
  • annotated-types
  • iniconfig
  • pluggy
  • pydantic
  • pydantic-core
  • pytest

Copy link
Member Author

Choose a reason for hiding this comment

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

Note: there are no changes in this file except the addition of is_same_repository in order to simplify the checks, e.g.:

Before:

if: ${{ endsWith(github.repository, /saleor-internal-actions) }}
# ...
if: ${{ !endsWith(github.repository, /saleor-internal-actions) }}

After:

if: ${{ inputs.is_same_repository }}
# ...
if: ${{ !inputs.is_same_repository }}

@NyanKiyoshi NyanKiyoshi marked this pull request as ready for review October 11, 2024 08:35
@NyanKiyoshi NyanKiyoshi requested a review from a team October 11, 2024 08:35
Base automatically changed from feature/grant/output-format-as-input to main October 15, 2024 09:02
This splits the SBOM & License Check jobs into a re-usable workflow in order to make it easier to run these two tasks together.

This is needed in order to not introduce lots of duplications (and complexity) when we will be implementing differential checking (base branch vs head branch), as we will be able to trigger the `run-generate-sbom-and-check-licenses.yaml` workflow both on base and head with only a few lines (instead of having many lines in order to generate SBOM, check licenses, etc.)

There are no changes in `run-generate-sbom-and-check-licenses.yaml` **except** the addition of `is_same_repository` in order to simplify the checks e.g., previously we had: `if: ${{ endsWith(github.repository, /saleor-internal-actions) }}`, now we have: `if: ${{ inputs.is_same_repository }}`
@NyanKiyoshi NyanKiyoshi force-pushed the enhancement/split-generate-sbom-and-license-check-workflow branch from fbc3c0f to 866f491 Compare October 15, 2024 09:03
@NyanKiyoshi NyanKiyoshi merged commit 53082ed into main Oct 15, 2024
4 checks passed
@NyanKiyoshi NyanKiyoshi deleted the enhancement/split-generate-sbom-and-license-check-workflow branch October 15, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants