Merge branch 'bugfix/osi' into dev #1781
This file contains 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
name: Syft SBOM Generation | |
on: | |
push: | |
paths-ignore: | |
- '**/resources/**' | |
jobs: | |
get-sbom-type: | |
runs-on: ubuntu-latest | |
outputs: | |
sbom-type: ${{ steps.sbom-type.outputs.type }} | |
steps: | |
- name: Get SBOM type | |
id: sbom-type | |
run: | | |
case ${GITHUB_REF##*/} in | |
${{ vars.PROD_BRANCH }}) echo "type=production" >> "$GITHUB_OUTPUT";; | |
${{ vars.DEV_BRANCH }}) echo "type=dev" >> "$GITHUB_OUTPUT";; | |
*) echo "type=snapshot" >> "$GITHUB_OUTPUT";; | |
esac | |
gen-sboms: | |
runs-on: ubuntu-latest | |
needs: get-sbom-type | |
env: | |
SBOM_TYPE: ${{ needs.get-sbom-type.outputs.sbom-type }} | |
steps: | |
- name: checkout | |
uses: actions/[email protected] | |
- name: spdx-sbom | |
uses: anchore/[email protected] | |
with: | |
format: spdx | |
artifact-name: svip-sbom-${{ env.SBOM_TYPE }}.spdx | |
- name: cyclonedx-sbom | |
uses: anchore/[email protected] | |
with: | |
format: cyclonedx-json | |
artifact-name: svip-sbom-cdx-${{ env.SBOM_TYPE }}.json |