-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (45 loc) · 1.27 KB
/
endorlabs.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
51
52
53
name: Endor Labs Scan
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
tenant_name:
description: "Enter your Endor Labs tenant name:"
required: true
api:
description: "Endor Labs API"
required: true
default: "https://api.endorlabs.com"
jobs:
scan:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: setup namespace
run: |
NAMESPACE=$(jq -r '.inputs.tenant_name' $GITHUB_EVENT_PATH)
echo "::add-mask::$NAMESPACE"
echo NAMESPACE=$NAMESPACE >> $GITHUB_ENV
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
cache: 'maven'
- name: Compile Package
run: mvn clean install
- name: Run endorctl
uses: endorlabs/[email protected]
with:
namespace: ${{ github.event.inputs.tenant_name }}
enable_github_action_token: true
scan_summary_output_type: "table"
additional_args: "--as-default-branch --api=${{ github.event.inputs.api}}"
pr: false