Skip to content

Commit a187f90

Browse files
authored
Add github action
1 parent 9a21e6c commit a187f90

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/main.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: FOSSA Rails Security Scan
2+
3+
on:
4+
pull_request:
5+
branches: [ main, master ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
fossa-scan:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version-file: '.ruby-version'
20+
bundler-cache: true
21+
22+
- name: Install dependencies
23+
run: |
24+
bundle install
25+
26+
- name: Install FOSSA CLI
27+
run: |
28+
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
29+
30+
- name: Run FOSSA analyze with snippet scanning
31+
run: |
32+
fossa analyze --x-snippet-scan
33+
env:
34+
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
35+
36+
- name: Run FOSSA test
37+
run: |
38+
fossa test
39+
env:
40+
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

0 commit comments

Comments
 (0)