Skip to content

Update maven.yml

Update maven.yml #59

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

Check failure on line 3 in .github/workflows/maven.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/maven.yml

Invalid workflow file

You have an error in your yaml syntax on line 3
name: Java CI with Maven
permissions:
#set default workflow permissions to read-only for security reasons
contents: read
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
#first job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven (includes running all tests)
run: mvn -B package --file pom.xml
#second job
depgraph:
runs-on: ubuntu-latest
permissions:
#write permission needed for updating dependency graph
contents: write
# Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@ed72a3242c5331913886b41ca9ea66c9195ebdaa # v4.0.0