Changed the installation script for synk so it correctly added to PATH #14
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: Java CI with Maven | |
on: | |
push: | |
branches: [ "main", "cd" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build_and_test: | |
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' | |
cache: 'maven' | |
- name: Build, Test and Verify | |
run: mvn -B clean verify | |
- name: Install Synk CLI | |
run: | | |
curl --compressed https://downloads.snyk.io/cli/stable/snyk-linux -o synk | |
chmod +x ./synk | |
mv ./synk /usr/local/bin/ | |
- name: Authenticate Synk | |
env: | |
SYNK_TOKEN: ${{ secrets.SYNK_TOKEN }} | |
run: | | |
export SYNK_TOKEN=$SYNK_TOKEN | |
synk auth | |
- name: Run Synk Vulnerability Test | |
run: synk test |