Skip to content

Commit b12b334

Browse files
authored
Merge pull request #75 from fallwith/main
Ruby workflow enhancements
2 parents 294983c + df39fd3 commit b12b334

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/fossa-ruby-bundler.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,22 @@ jobs:
2222
FOSSA_ANALYZE_RESULT: ""
2323

2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- uses: ruby/setup-ruby@v1
2727
with:
28-
ruby-version: '3.2'
28+
ruby-version: '3.3'
29+
- name: Ensure that a Gemfile.lock file exists for each Gemfile file
30+
run: |
31+
echo "Ensuring that Gemfile.lock files exist..."
32+
for gemfile in $(find . -name Gemfile -not -path './test/**' -not -path './spec/**'); do
33+
dir=${gemfile%/*}
34+
echo "Found Gemfile at $dir"
35+
if [[ -e "$dir/Gemfile.lock" ]]; then
36+
echo "Found Gemfile.lock at $dir"
37+
else
38+
echo "No Gemfile.lock found at $dir - generating one..."
39+
bundle lock --gemfile "$dir/Gemfile"
40+
fi
41+
done
2942
- id: fossa-cli
3043
uses: newrelic/.github/.github/composite/fossa-composite@main

0 commit comments

Comments
 (0)