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

feat: Add support for running inside a matrix by overriding the default correlator identifier #50

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

felickz
Copy link

@felickz felickz commented Aug 8, 2024

This pull request introduces support for running the action inside a matrix by enhancing the correlator functionality, updates the action's input configuration, and modifies the main script to utilize the new correlator input.

Inspiration: wanted to loop through all SBOM samples in spdx sample repo via dependency_submission.yml but noticed all the correlators were taking the name of my job only (not the name of the job+matrix instance).

Matrix Support and Correlator Enhancements:

  • README.md: Added instructions for defining a correlator that includes job and matrix values, and provided a sample YAML configuration for SBOM upload. (View rendered markdown)
  • action.yml: Introduced a new input correlator with a description and default value set to ${{ github.job }}.
  • index.js: Modified the correlator property in the Snapshot object to use the value from the new correlator input instead of the default ${github.context.job}.

Before: job only:

image

After: support for job(matrixValue1, matrixValue2, ...):

image

Sample

Using sample provided in readme, can have the correlator match the action job naming:
image

@felickz felickz requested a review from a team as a code owner August 8, 2024 02:08
Copy link

github-actions bot commented Aug 8, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@felickz felickz changed the title feat: Add support for running inside a matrix and overriding the default correlator identifier feat: Add support for running inside a matrix by overriding the default correlator identifier Aug 8, 2024
Copy link
Contributor

@GeekMasher GeekMasher left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants