Skip to content

Commit 43f0c37

Browse files
committed
updated config to run bundle install in grype scan if run-bundle-install set to true
Signed-off-by: nikhil2611 <ngupta@progress.com>
1 parent 805747b commit 43f0c37

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/ci-main-pull-request.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,20 @@ jobs:
888888
with:
889889
fetch-depth: 0
890890

891+
- name: Set up Ruby
892+
if: ${{ inputs.language == 'ruby' && inputs.run-bundle-install == true }}
893+
uses: ruby/setup-ruby@v1
894+
with:
895+
ruby-version: '3.4'
896+
bundler-cache: false
897+
898+
- name: Run bundle install to generate Gemfile.lock
899+
if: ${{ inputs.language == 'ruby' && inputs.run-bundle-install == true }}
900+
run: |
901+
echo "Generating Gemfile.lock for Grype scan..."
902+
bundle install
903+
echo "Gemfile.lock generated successfully"
904+
891905
- name: Determine severity threshold
892906
id: severity
893907
run: |
@@ -1568,7 +1582,7 @@ jobs:
15681582
name: 'Generating SBOM'
15691583
# Create software bill-of-materials (SBOM) using SPDX format
15701584
if: ${{ inputs.generate-sbom == true }}
1571-
uses: chef/common-github-actions/.github/workflows/sbom.yml@main
1585+
uses: chef/common-github-actions/.github/workflows/sbom.yml@nikhil/bundle-install-grype-scan
15721586
needs: checkout # TODO: fix set-application-version
15731587
secrets: inherit
15741588
with:

0 commit comments

Comments
 (0)