From 0b8803ed4b69da2b7b9899c63eb32d71ebc9226f Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Thu, 15 May 2025 12:42:53 -0600 Subject: [PATCH] ci(.github): add fossa.yml and .fossa.yml config Signed-off-by: Vaughn Dice Co-authored-by: Kate Goldenring Co-authored-by: Lann --- .fossa.yml | 5 +++++ .github/workflows/fossa.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .fossa.yml create mode 100644 .github/workflows/fossa.yml diff --git a/.fossa.yml b/.fossa.yml new file mode 100644 index 000000000..f32e2965a --- /dev/null +++ b/.fossa.yml @@ -0,0 +1,5 @@ +version: 3 + +paths: + exclude: + - ./templates/** diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml new file mode 100644 index 000000000..b2812593b --- /dev/null +++ b/.github/workflows/fossa.yml @@ -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://raw.githubusercontent.com/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/fossa-action@v1.7.0 # Use a specific version if locking is preferred + # env: + # FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} + # with: + # api-key: ${{ env.FOSSA_API_KEY }}