Skip to content

Build Release

Build Release #13

Workflow file for this run

name: Build Release
on:
pull_request:
branches: [main]
workflow_dispatch:
push:
branches: [main]
jobs:
build:
permissions:
issues: write
pull-requests: write
security-events: write
contents: read
id-token: write
actions: read
runs-on: ubuntu-latest
steps:
- name: Clone Repo
uses: actions/checkout@v3
- name: Setup JDK with Maven
uses: actions/setup-java@v3
with:
distribution: microsoft
java-version: 17
- name: Build release package
run: mvn -B clean install
- name: Endor Labs Scan
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
uses: endorlabs/[email protected]
with:
namespace: "endorlabs-hearts-github"
pr: "false"
sarif_file: endor-labs.sarif
- name: Endor Labs Scan PR to Default Branch
if: github.event_name == 'pull_request'
uses: endorlabs/[email protected]
with:
namespace: "endorlabs-hearts-github"
pr: true
enable_pr_comments: true
github_token: ${{ secrets.GITHUB_TOKEN }}"
sarif_file: endor-labs.sarif
- name: Upload SARIF to github
uses: github/codeql-action/upload-sarif@9885f86fab4879632b7e44514f19148225dfbdcd
with:
sarif_file: endor-labs.sarif
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: endorlabs-java-webapp-demo
path: |
target/endor-java-webapp-demo.jar