Skip to content

Commit

Permalink
upload sbom to s3
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jun 12, 2024
1 parent cc2871e commit 3eb66c5
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release-5.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,37 @@ jobs:
product_name: js-bson
file: sarif-report.json
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

upload_sbom_lite:
environment: release
runs-on: ubuntu-latest
needs: [release_please]
permissions:
# required for all workflows
security-events: write
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up drivers-github-tools
uses: mongodb-labs/drivers-github-tools/setup@v2
with:
aws_region_name: us-east-1
aws_role_arn: ${{ secrets.aws_role_arn }}
aws_secret_id: ${{ secrets.aws_secret_id }}

- name: Get release version and release package file name
id: get_version
shell: bash
run: |
package_version=$(jq --raw-output '.version' package.json)
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
- name: actions/publish_asset_to_s3
uses: mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@main
with:
version: ${{ steps.get_version.outputs.package_version }}
product_name: js-bson
file: sbom.json
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,36 @@ jobs:
file: sarif-report.json
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

upload_sbom_lite:
environment: release
runs-on: ubuntu-latest
needs: [release_please]
permissions:
# required for all workflows
security-events: write
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up drivers-github-tools
uses: mongodb-labs/drivers-github-tools/setup@v2
with:
aws_region_name: us-east-1
aws_role_arn: ${{ secrets.aws_role_arn }}
aws_secret_id: ${{ secrets.aws_secret_id }}

- name: Get release version and release package file name
id: get_version
shell: bash
run: |
package_version=$(jq --raw-output '.version' package.json)
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
- name: actions/publish_asset_to_s3
uses: mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@main
with:
version: ${{ steps.get_version.outputs.package_version }}
product_name: js-bson
file: sbom.json
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

0 comments on commit 3eb66c5

Please sign in to comment.