Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
blootsvoets committed May 9, 2022
1 parent 318d3ce commit e5f3355
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 52 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,15 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-java@v1
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Cache
uses: actions/cache@v2
with:
# Cache gradle directories
path: |
~/.gradle/caches
~/.gradle/wrapper
# Key for restoring and saving the cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', 'gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

# Compile the code
- name: Compile code
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/publish_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,19 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Has SNAPSHOT version
id: is-snapshot
run: grep "version = '.*-SNAPSHOT'" build.gradle

- uses: actions/setup-java@v1
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Cache
uses: actions/cache@v2
with:
# Cache gradle directories
path: |
~/.gradle/caches
~/.gradle/wrapper
# Key for restoring and saving the cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', 'gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Install gpg secret key
run: |
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,15 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Cache
uses: actions/cache@v2
with:
# Cache gradle directories
path: |
~/.gradle/caches
~/.gradle/wrapper
# Key for restoring and saving the cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', 'gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

# Compile code
- name: Compile code
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/scheduled_snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,26 @@ jobs:
env:
REPORT_FILE: test.json
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/gradle-jdk11@master
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run Snyk
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test
args: --json-file-output=${{ env.REPORT_FILE }}
run: >
snyk test
--all-sub-projects
--configuration-matching='^runtimeClasspath$'
--json-file-output=${{ env.REPORT_FILE }}
--org=radar-base
- name: Report new vulnerabilities
uses: thehyve/report-vulnerability@master
with:
Expand Down
28 changes: 21 additions & 7 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,24 @@ jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/gradle-jdk11@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run Snyk to check for vulnerabilities
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: >
snyk test
--all-sub-projects
--configuration-matching='^runtimeClasspath$'
--fail-on=upgradable
--org=radar-base
--severity-threshold=high

0 comments on commit e5f3355

Please sign in to comment.