Add linter.
This commit is contained in:
parent
53e95073d2
commit
c30d17a4a0
8 changed files with 187 additions and 113 deletions
57
.github/workflows/snapshot.yml
vendored
57
.github/workflows/snapshot.yml
vendored
|
@ -1,28 +1,45 @@
|
|||
name: Snapshot
|
||||
|
||||
on:
|
||||
"on":
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- '[1-9]+.[0-9]+.x'
|
||||
- 'main'
|
||||
- '[1-9]+.[0-9]+.x'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
lint-yaml:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: setup
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
server-id: sonatype-nexus
|
||||
server-username: SERVER_USERNAME
|
||||
server-password: SERVER_PASSWORD
|
||||
- name: dependencies
|
||||
run: mvn -B -q dependency:go-offline
|
||||
- name: deploy
|
||||
run: mvn -B deploy
|
||||
env:
|
||||
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
|
||||
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ibiqlik/action-yamllint@v3
|
||||
with:
|
||||
format: colored
|
||||
strict: true
|
||||
|
||||
lint-markdown:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker://avtodev/markdown-lint:v1
|
||||
with:
|
||||
args: /github/workspace
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- lint-markdown
|
||||
- lint-yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
server-id: sonatype-nexus
|
||||
server-username: SERVER_USERNAME
|
||||
server-password: SERVER_PASSWORD
|
||||
- run: mvn -B dependency:go-offline -q
|
||||
- run: mvn -B deploy -Poss
|
||||
env:
|
||||
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
|
||||
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue