Skip to content

Java CI with Maven

Java CI with Maven #3

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Maven
on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
workflow_dispatch:
jobs:
build:
environment: sass.mend.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Mend Scanners
run: |
echo "Downloading the UA"
curl -LJO "https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar"
echo "Downloading the CLI"
curl https://downloads.mend.io/cli/linux_amd64/mend -o /usr/local/bin/mend && chmod +x /usr/local/bin/mend
- name: "Building Maven"
run: |
echo "Building Maven"
mvn clean install -DskipTests
- name: "Running the CLI"
run: |
mend dep --non-interactive --extended --update --scope "Tyler_Package_Manager-HW//${{ github.repository }}_CLI"
env:
MEND_USER_KEY: ${{ secrets.USER_KEY }}
MEND_EMAIL: ${{ secrets.USER_EMAIL }}
MEND_URL: ${{ secrets.MEND_URL }}
MEND_LOG_LEVEL: "DEBUG"
MEND_APIKEY: ${{ secrets.API_KEY }}
- name: 'Running the UA'
run: |
echo "gradle.includedConfigurations=runtimeClasspath" >> wss-unified-agent.config
java -jar wss-unified-agent.jar
env:
WS_USERKEY: ${{ secrets.USER_KEY }}
MEND_EMAIL: ${{ secrets.USER_EMAIL }}
WS_WSS_URL: "${{ secrets.MEND_URL }}/agent"
LOG_LEVEL: "DEBUG"
WS_APIKEY: ${{ secrets.API_KEY }}
WS_PROJECTNAME: "${{ github.repository }}_UA"
WS_PRODUCTNAME: "Tyler_Package_Manager-HW"