Files
qqq/.github/workflows/maven.yml
Workflow config file is invalid. Please check your config file: yaml: line 28: mapping values are not allowed in this context

48 lines
1.3 KiB
YAML

# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Restore Maven cache
uses: skjolber/maven-cache-github-action@v1
with:
step: restore
- name: maven-settings-action
uses: s4u/maven-settings-action@v2.4.1
with:
servers: |
[{
"id": "github",
"username": "${{ secrets.QQQ_MAVEN_REGISTRY_USERNAME }}",
"password": "${{ secrets.QQQ_MAVEN_REGISTRY_PASSWORD }}"
}]
- name: Cat settings.xml
run: cat /home/runner/.m2/settings.xml
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Save Maven cache
uses: skjolber/maven-cache-github-action@v1
with:
step: save