Skip to content

Commit

Permalink
update names and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MP91 committed Feb 20, 2023
1 parent 50dcf63 commit df53769
Show file tree
Hide file tree
Showing 5 changed files with 78,086 additions and 78,079 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build-base-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,24 @@ jobs:

- name: Generate SBOM
run: |
docker sbom --format ${{ matrix.format }}-json --output SBOM/${{ matrix.format }}/sbom-python.json ghcr.io/${{ github.repository }}/python:${{ needs.build-image.outputs.tag }}
docker sbom --format ${{ matrix.format }}-json --output SBOM/${{ matrix.format }}/sbom-cpp.json ghcr.io/${{ github.repository }}/cpp:${{ needs.build-image.outputs.tag }}
docker sbom --format ${{ matrix.format }}-json --output SBOM/python.${{ matrix.format }}.json ghcr.io/${{ github.repository }}/python:${{ needs.build-image.outputs.tag }}
docker sbom --format ${{ matrix.format }}-json --output SBOM/cpp.${{ matrix.format }}.json ghcr.io/${{ github.repository }}/cpp:${{ needs.build-image.outputs.tag }}
- name: Upload SBOM as artifact
uses: actions/upload-artifact@v3
with:
name: SBOM ${{ matrix.format }}
path: |
SBOM/${{ matrix.format }}/*.json
SBOM/*.json
- name: Fail if SBOM changed
- uses: EndBug/add-and-commit@v9
if: ${{ github.ref }} == "refs/heads/main" # only directly push on scheduled runs
with:
message: 'Updated SBOM'
commit: --signoff
pull: '--rebase'

- name: Fail if SBOM changed # If in a PR or not on main, fail if SBOM changed
run: |
if [[ -n $(git diff -w -I'^.*SPDXID' -I'^.*ghcr.io/${{ github.repository }}' \
-I'^.*created' -I'^.*spdxElementId' -I'^.*relatedSpdxElement' -I'^.*comment' -I'^.*version": "sha256' \
Expand Down
File renamed without changes.
Loading

0 comments on commit df53769

Please sign in to comment.