From a172fb797b4bee0e71d19ed539286f1a8ffd36dd Mon Sep 17 00:00:00 2001 From: Dimitri Stiliadis Date: Mon, 12 Feb 2024 13:15:29 -0800 Subject: [PATCH] Update endorlabs.yml Update caches --- .github/workflows/endorlabs.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/endorlabs.yml b/.github/workflows/endorlabs.yml index 894dfb6..3fb64ac 100644 --- a/.github/workflows/endorlabs.yml +++ b/.github/workflows/endorlabs.yml @@ -30,13 +30,24 @@ jobs: NAMESPACE=$(jq -r '.inputs.tenant_name' $GITHUB_EVENT_PATH) echo "::add-mask::$NAMESPACE" echo NAMESPACE=$NAMESPACE >> $GITHUB_ENV + + - name: Use Caches + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Checkout Repository uses: actions/checkout@v3 + - name: Setup Java uses: actions/setup-java@v3 with: distribution: microsoft java-version: "17" + - name: Endor Labs Workflow Dispatch if: ${{ github.event_name == 'workflow_dispatch' }} uses: endorlabs/github-action@736c93ea52b002f2ac229aaeb273b102cbf6fe12 @@ -49,6 +60,7 @@ jobs: scan_secrets: "true" scan_git_logs: "true" additional_args: "--as-default-branch --api=${{ github.event.inputs.api }}" + - name: Endor Labs Scan PR to Default Branch if: github.event_name == 'pull_request' uses: endorlabs/github-action@736c93ea52b002f2ac229aaeb273b102cbf6fe12 @@ -60,6 +72,7 @@ jobs: enable_pr_comments: "true" scan_dependencies: "true" scan_secrets: "true" + - name: Endor Labs Watch if: ${{ github.event_name == 'push' }} uses: endorlabs/github-action@736c93ea52b002f2ac229aaeb273b102cbf6fe12