Maintain actions (#71)

This commit is contained in:
Stephan Schnabel 2022-09-02 10:30:37 +02:00 committed by GitHub
parent 45dc3e361d
commit 9411c2b1b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 85 additions and 121 deletions

View file

@ -3,10 +3,10 @@ updates:
- package-ecosystem: maven
directory: /
schedule:
interval: monthly
interval: daily
ignore:
- dependency-name: ch.qos.logback:logback-classic
update-types: ["version-update:semver-major", "version-update:semver-minor"]
update-types: [version-update:semver-major, version-update:semver-minor]
- package-ecosystem: github-actions
directory: /
schedule:

61
.github/workflows/ci.yaml vendored Normal file
View file

@ -0,0 +1,61 @@
name: CI
on:
push:
branches: [main]
pull_request: {}
schedule: [cron: 0 0 * * 1-5]
jobs:
yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ibiqlik/action-yamllint@v3
with:
format: colored
strict: true
markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: avto-dev/markdown-lint@v1
with:
args: /github/workspace
codeql:
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v2
with:
languages: java
- uses: github/codeql-action/autobuild@v2
- uses: github/codeql-action/analyze@v2
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: maven
server-id: sonatype-nexus
server-username: SERVER_USERNAME
server-password: SERVER_PASSWORD
- run: mvn -B -ntp dependency:go-offline
- run: mvn -B -ntp verify
if: ${{ github.ref != 'refs/heads/main' }}
- run: mvn -B -ntp deploy
if: ${{ github.ref == 'refs/heads/main' }}
env:
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}

View file

@ -1,22 +0,0 @@
name: CodeQL
"on":
workflow_dispatch: {}
pull_request: {}
schedule:
- cron: '0 0 * * *'
jobs:
codeql:
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v2
with:
languages: java
- uses: github/codeql-action/autobuild@v2
- uses: github/codeql-action/analyze@v2

View file

@ -1,6 +1,6 @@
name: Dependabot
"on": pull_request_target
on: pull_request_target
jobs:
auto-merge:

View file

@ -1,26 +0,0 @@
name: Lint
"on":
workflow_dispatch: {}
push:
branches: [main]
pull_request: {}
jobs:
yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ibiqlik/action-yamllint@v3
with:
format: colored
strict: true
markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: avto-dev/markdown-lint@v1
with:
args: /github/workspace

View file

@ -1,26 +0,0 @@
name: PullRequest
"on": pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: maven
- run: mvn -B dependency:go-offline
- run: mvn -B verify
- uses: dorny/test-reporter@v1.5.0
if: failure()
with:
name: surefire
path: '**/target/surefire-reports/*.xml,**/target/invoker-reports/*.xml'
reporter: java-junit
list-suites: failed
list-tests: failed
fail-on-error: false

View file

@ -1,6 +1,6 @@
name: Release
"on": workflow_dispatch
on: workflow_dispatch
jobs:
build:
@ -25,9 +25,9 @@ jobs:
server-password: SERVER_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- run: mvn -B dependency:go-offline
- run: mvn -B release:prepare
- run: mvn -B release:perform
- run: mvn -B -ntp dependency:go-offline
- run: mvn -B -ntp release:prepare
- run: mvn -B -ntp release:perform
env:
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}

View file

@ -1,35 +0,0 @@
name: Snapshot
"on":
workflow_dispatch: {}
push:
branches: [main]
paths-ignore: ['**.md']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: maven
server-id: sonatype-nexus
server-username: SERVER_USERNAME
server-password: SERVER_PASSWORD
- run: mvn -B dependency:go-offline
- run: mvn -B deploy
env:
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
- uses: dorny/test-reporter@v1.5.0
if: failure()
with:
name: surefire
path: '**/target/surefire-reports/*.xml'
reporter: java-junit
list-suites: failed
list-tests: failed
fail-on-error: false

View file

@ -1,6 +1,9 @@
# Default state for all rules
default: true
# MD013/line-length - Line length
MD013:
line_length: 10000
# MD009 - Trailing spaces
MD009:
strict: true
# MD013 - Line length
MD013: false

View file

@ -8,3 +8,12 @@ rules:
# line length is not important
line-length: disable
# force double quotes everywhere
quoted-strings:
quote-type: double
required: only-when-needed
# allow everything on keys
truthy:
check-keys: false