Mend Reachability CLI Scan (MacOS) #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mend Reachability CLI Scan (MacOS) | |
on: workflow_dispatch | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Install Maven 3.8.8 | |
run: | | |
curl https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz -o maven.3.8.8.tar.gz | |
tar xzvf maven.3.8.8.tar.gz | |
pwd | |
ls -lah | |
- name: Build with Maven | |
run: | | |
./apache-maven-3.8.8/bin/mvn --version | |
./apache-maven-3.8.8//bin/mvn clean install -DskipTests=true | |
# The mend dep scan should be called AFTER a package manager build step such as "mvn clean install -DskipTests=true" or "npm install --only=prod" | |
- name: Mend CLI Download | |
env: | |
MEND_EMAIL: ${{secrets.MEND_EMAIL}} | |
MEND_USER_KEY: ${{secrets.MEND_USER_KEY}} | |
MEND_URL: https://saas.whitesourcesoftware.com | |
run: | | |
echo === Downloading Mend CLI == | |
curl https://downloads.mend.io/cli/darwin_amd64/mend -o /usr/local/bin/mend && chmod +x /usr/local/bin/mend | |
echo === Mend CLI version: === | |
mend version | |
- name: Mend CLI Scan | |
env: | |
MEND_EMAIL: ${{secrets.MEND_EMAIL}} | |
MEND_USER_KEY: ${{secrets.MEND_USER_KEY}} | |
MEND_URL: https://saas.whitesourcesoftware.com | |
run: | | |
echo === Running Scan === | |
mend dep -u --reachability-on | |
continue-on-error: true | |
- name: Mend CLI Logs | |
run: cat ~/.mend/logs/sca/*.log |