Skip to content

ci(.github): add fossa.yml #3138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 3

paths:
exclude:
- ./templates/**
36 changes: 36 additions & 0 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: fossa
on:
push:
branches:
- main
- v*
pull_request:
branches:
- main
workflow_dispatch:

jobs:
fossa-scan:
# Don't attempt to run FOSSA on forks or on PRs from forks (no access to GH secrets)
if: ${{ github.repository_owner == 'spinframework' && !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: "Install fossa CLI"
run: |
curl -H 'Cache-Control: no-cache' https://github.com/raw/fossas/fossa-cli/master/install-latest.sh | bash

- name: "Run FOSSA Scan"
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
run: fossa analyze

# - name: "Run FOSSA Scan"
# uses: fossas/[email protected] # Use a specific version if locking is preferred
# env:
# FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
# with:
# api-key: ${{ env.FOSSA_API_KEY }}
Loading