Skip to content

Commit

Permalink
Fix java setup in snyk github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Oct 5, 2023
1 parent 086143c commit 3e08448
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/snyk-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@ jobs:

steps:
- name: Setup Java 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
java-version: |
8
11
- uses: actions/checkout@v3
with:
path: mqtt-cli

- name: Check for new issues
uses: hivemq/hivemq-snyk-composite-action@v1
uses: hivemq/hivemq-snyk-composite-action@v2.0.0
with:
snyk-args: --configuration-matching=^runtimeClasspath$ mqtt-cli
snyk-token: ${{ secrets.SNYK_TOKEN }}
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/snyk-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@ jobs:

steps:
- name: Setup Java 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
java-version: |
8
11
- uses: actions/checkout@v3
with:
path: mqtt-cli

- name: Setup Snyk
uses: snyk/actions/setup@master

- name: Run Snyk monitor
uses: snyk/actions/gradle-jdk11@master
shell: bash
run: snyk monitor --configuration-matching=^runtimeClasspath$ --target-reference=${{ github.ref_name }} mqtt-cli
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
args: --configuration-matching=^runtimeClasspath$ --target-reference=${{ github.ref_name }} mqtt-cli
15 changes: 9 additions & 6 deletions .github/workflows/snyk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@ jobs:

steps:
- name: Setup Java 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
java-version: |
8
11
- uses: actions/checkout@v3
with:
path: mqtt-cli

- name: Setup Snyk
uses: snyk/actions/setup@master

- name: Run Snyk monitor
uses: snyk/actions/gradle-jdk11@master
shell: bash
run: snyk monitor --configuration-matching=^runtimeClasspath$ --target-reference=${{ github.ref_name }} mqtt-cli
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
args: --configuration-matching=^runtimeClasspath$ --target-reference=${{ github.ref_name }} mqtt-cli

0 comments on commit 3e08448

Please sign in to comment.