-
Notifications
You must be signed in to change notification settings - Fork 30
50 lines (47 loc) · 1.71 KB
/
fossa-gradle.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: FOSSA CLI Analysis - Gradle
on:
pull_request:
branches: [ $default-branch ]
jobs:
check_env:
uses: newrelic/.github/.github/workflows/fossa-check-env.yml@main
secrets:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
fossa:
needs: check_env
if: ${{ needs.check_env.outputs.HAS_FOSSA_API_KEY == 'true' }}
runs-on: ubuntu-latest
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
ORG: ${{ github.repository_owner }}
REPO: ${{ github.repository }}
CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }}
HAS_FOSSA_TARGETS: ""
FOSSA_ANALYZE_RESULT: ""
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Setup javas
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: |
21
17
11
8
- name: Set gradle.properties
run: |
export GRADLE_PROPERTIES_PATH="./gradle.properties"
echo "jdk8=${JAVA_HOME_8_X64}" >> $GRADLE_PROPERTIES_PATH
echo "jdk11=${JAVA_HOME_11_X64}" >> $GRADLE_PROPERTIES_PATH
echo "jdk17=${JAVA_HOME_17_X64}" >> $GRADLE_PROPERTIES_PATH
echo "jdk21=${JAVA_HOME_21_X64}" >> $GRADLE_PROPERTIES_PATH
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: true
- name: Setup Gradle options
run: echo "GRADLE_OPTIONS=--console=plain --parallel -Porg.gradle.java.installations.auto-detect=false -Porg.gradle.java.installations.fromEnv=JAVA_HOME_8_X64,JAVA_HOME_11_X64,JAVA_HOME_17_X64,JAVA_HOME_21_X64" >> $GITHUB_ENV
- id: fossa-cli
uses: newrelic/.github/.github/composite/fossa-composite@main