Merge pull request #501 from binkley/dependabot/maven/com.puppycrawl.… #425
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: Build with Gradle using Earthly | |
env: | |
OWASP_NVD_API_KEY: ${{ secrets.OWASP_NVD_API_KEY }} | |
on: | |
push: | |
paths-ignore: | |
- '*.md' | |
- 'images/**' | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
- 'images/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Builds and tests | |
runs-on: ubuntu-latest | |
# First run in GitHub actions - verify this | |
# Afterwards, change to a comment | |
strategy: | |
matrix: | |
include: | |
- java: 21 | |
steps: | |
- name: Use Earthly | |
uses: earthly/actions-setup@v1 | |
with: | |
# TODO: A specific Earthly version, and manually connect to the | |
# local version | |
version: v0.8 | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Restore Gradle caches | |
uses: actions/cache@master | |
env: | |
cache-name: gradle-cache | |
with: | |
path: ~/.gradle | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{hashFiles('**/build.gradle') }} | |
# TODO: See discussion: https://github.com/jeremylong/DependencyCheck/issues/2560#issuecomment-702098748 | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Build and test | |
run: earthly --secret OWASP_NVD_API_KEY +build-with-gradle | |
- name: Execute run script | |
run: earthly --secret OWASP_NVD_API_KEY +run-with-gradle |