Skip to content

Commit 3eb66c5

Browse files
upload sbom to s3
1 parent cc2871e commit 3eb66c5

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

.github/workflows/release-5.x.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,37 @@ jobs:
7878
product_name: js-bson
7979
file: sarif-report.json
8080
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
81+
82+
upload_sbom_lite:
83+
environment: release
84+
runs-on: ubuntu-latest
85+
needs: [release_please]
86+
permissions:
87+
# required for all workflows
88+
security-events: write
89+
id-token: write
90+
contents: write
91+
92+
steps:
93+
- uses: actions/checkout@v4
94+
- name: Set up drivers-github-tools
95+
uses: mongodb-labs/drivers-github-tools/setup@v2
96+
with:
97+
aws_region_name: us-east-1
98+
aws_role_arn: ${{ secrets.aws_role_arn }}
99+
aws_secret_id: ${{ secrets.aws_secret_id }}
100+
101+
- name: Get release version and release package file name
102+
id: get_version
103+
shell: bash
104+
run: |
105+
package_version=$(jq --raw-output '.version' package.json)
106+
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
107+
108+
- name: actions/publish_asset_to_s3
109+
uses: mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@main
110+
with:
111+
version: ${{ steps.get_version.outputs.package_version }}
112+
product_name: js-bson
113+
file: sbom.json
114+
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,36 @@ jobs:
7878
file: sarif-report.json
7979
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
8080

81+
upload_sbom_lite:
82+
environment: release
83+
runs-on: ubuntu-latest
84+
needs: [release_please]
85+
permissions:
86+
# required for all workflows
87+
security-events: write
88+
id-token: write
89+
contents: write
90+
91+
steps:
92+
- uses: actions/checkout@v4
93+
- name: Set up drivers-github-tools
94+
uses: mongodb-labs/drivers-github-tools/setup@v2
95+
with:
96+
aws_region_name: us-east-1
97+
aws_role_arn: ${{ secrets.aws_role_arn }}
98+
aws_secret_id: ${{ secrets.aws_secret_id }}
99+
100+
- name: Get release version and release package file name
101+
id: get_version
102+
shell: bash
103+
run: |
104+
package_version=$(jq --raw-output '.version' package.json)
105+
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
106+
107+
- name: actions/publish_asset_to_s3
108+
uses: mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@main
109+
with:
110+
version: ${{ steps.get_version.outputs.package_version }}
111+
product_name: js-bson
112+
file: sbom.json
113+
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

0 commit comments

Comments
 (0)