-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (48 loc) · 1.39 KB
/
fossa-analyze.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Execute FOSSA analyze action
on:
pull_request_target:
branches:
- main
paths:
- 'gradle/**'
push:
branches:
- main
paths:
- 'gradle/**'
workflow_dispatch:
jobs:
fossa-scan:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version-file: .java-version
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Cache konan
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: wrapper
- uses: fossas/fossa-action@v1
with:
api-key: ${{secrets.FOSSA_API_KEY}}
branch: ${{ github.event.pull_request.head.ref || github.ref_name }}
- uses: fossas/fossa-action@v1
if: github.event_name != 'push'
with:
api-key: ${{secrets.FOSSA_API_KEY}}
run-tests: true