Skip to content

Commit 72bf9a7

Browse files
SK-2342: add endorlabsScan yml file
1 parent a490c80 commit 72bf9a7

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Endor Labs Scan Java Project
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
java_version:
7+
description: "The version of Java to be used for build"
8+
default: "8.0.422"
9+
required: true
10+
11+
jobs:
12+
build-and-scan:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
id-token: write
16+
contents: read
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-java@v4
20+
with:
21+
distribution: zulu
22+
java-version: ${{ github.event.inputs.java_version }}
23+
24+
- name: Create env
25+
id: create-env
26+
run: |
27+
touch .env
28+
echo SKYFLOW_CREDENTIALS=${{ secrets.SKYFLOW_CREDENTIALS }} >> .env
29+
echo TEST_EXPIRED_TOKEN=${{ secrets.TEST_EXPIRED_TOKEN }} >> .env
30+
echo TEST_REUSABLE_TOKEN=${{ secrets.TEST_REUSABLE_TOKEN }} >> .env
31+
32+
- name: create-json
33+
id: create-json
34+
uses: jsdaniell/create-json@1.1.2
35+
with:
36+
name: "credentials.json"
37+
json: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }}
38+
39+
- name: Compile Package
40+
run: mvn -B package -f pom.xml -Dmaven.javadoc.skip=true
41+
42+
- name: Endor Labs SCA Scan
43+
uses: endorlabs/github-action@main
44+
with:
45+
namespace: "skyflow"
46+
api: "https://api.endorlabs.com"
47+
pr: false
48+
enable_github_action_token: true
49+
scan_dependencies: true
50+
additional_args: "--as-default-branch --call-graph-languages=java"

0 commit comments

Comments
 (0)