Skip to content

Commit dc80305

Browse files
vdicekate-goldenringlann
committed
ci(.github): add fossa.yml and .fossa.yml config
Signed-off-by: Vaughn Dice <[email protected]> Co-authored-by: Kate Goldenring <[email protected]> Co-authored-by: Lann <[email protected]>
1 parent dd6b7b7 commit dc80305

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.fossa.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 3
2+
3+
paths:
4+
exclude:
5+
- ./templates/**

.github/workflows/fossa.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: fossa
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- v*
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
fossa-scan:
14+
# Don't attempt to run FOSSA on forks or on PRs from forks (no access to GH secrets)
15+
if: ${{ github.repository_owner == 'spinframework' && !github.event.pull_request.head.repo.fork }}
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: "Install fossa CLI"
23+
run: |
24+
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
25+
26+
- name: "Run FOSSA Scan"
27+
env:
28+
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
29+
run: fossa analyze -c .fossa.yml
30+
31+
# - name: "Run FOSSA Scan"
32+
# uses: fossas/[email protected] # Use a specific version if locking is preferred
33+
# env:
34+
# FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
35+
# with:
36+
# api-key: ${{ env.FOSSA_API_KEY }}

0 commit comments

Comments
 (0)