From 2a31de933d80ba644614bf5f1c8592a4e10bef64 Mon Sep 17 00:00:00 2001 From: Stephan Schnabel Date: Tue, 1 Mar 2022 13:19:37 +0100 Subject: [PATCH] Maintain actions. --- .github/CODEOWNERS | 6 ++---- .github/dependabot.yml | 4 ++++ .github/workflows/codeql.yaml | 7 ++----- .github/workflows/dependabot.yaml | 22 ++++++++++++++++++++ .github/workflows/lint.yaml | 26 ++++++++++++++++++++++++ .github/workflows/pullrequest.yaml | 26 ++++++++++++++++++++++++ .github/workflows/release.yaml | 9 ++++----- .github/workflows/snapshot.yaml | 32 +++++++----------------------- README.md | 3 ++- pom.xml | 18 +++++++++++------ 10 files changed, 107 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/dependabot.yaml create mode 100644 .github/workflows/lint.yaml create mode 100644 .github/workflows/pullrequest.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 514ce68..8ddbdd5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,2 @@ -@sschnabe -@wistefan -@rpahli -@fabian-schlegel +# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax +* @sschnabe @rpahli @fabian-schlegel diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a16b8c5..bfd400d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,6 +2,8 @@ version: 2 updates: - package-ecosystem: maven directory: / + open-pull-requests-limit: 1 + rebase-strategy: auto schedule: interval: daily ignore: @@ -9,5 +11,7 @@ updates: update-types: ["version-update:semver-major", "version-update:semver-minor"] - package-ecosystem: github-actions directory: / + open-pull-requests-limit: 1 + rebase-strategy: auto schedule: interval: daily diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index dcf4f74..3331a20 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -2,10 +2,7 @@ name: CodeQL "on": workflow_dispatch: {} - push: - branches: [main] - pull_request: - branches: [main] + pull_request: {} schedule: - cron: '0 0 * * *' @@ -17,7 +14,7 @@ jobs: actions: read contents: read steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.4.0 - uses: github/codeql-action/init@v1 with: languages: java diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml new file mode 100644 index 0000000..494aa7f --- /dev/null +++ b/.github/workflows/dependabot.yaml @@ -0,0 +1,22 @@ +name: Dependabot + +"on": pull_request_target + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - uses: dependabot/fetch-metadata@v1.1.1 + id: metadata + with: + github-token: "${{ secrets.GIT_ACTION_TOKEN }}" + - run: gh pr review --approve "$PR_URL" + if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }} + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{ secrets.GIT_ACTION_TOKEN }} + - run: gh pr merge --auto "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{ secrets.GIT_ACTION_TOKEN }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..a5f0047 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,26 @@ +name: Lint + +"on": + workflow_dispatch: {} + push: + branches: [main] + pull_request: {} + +jobs: + + yaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.4.0 + - uses: ibiqlik/action-yamllint@v3.1.0 + with: + format: colored + strict: true + + markdown: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.4.0 + - uses: avto-dev/markdown-lint@v1.5.0 + with: + args: /github/workspace diff --git a/.github/workflows/pullrequest.yaml b/.github/workflows/pullrequest.yaml new file mode 100644 index 0000000..9715c00 --- /dev/null +++ b/.github/workflows/pullrequest.yaml @@ -0,0 +1,26 @@ +name: PullRequest + +"on": pull_request + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.4.0 + - uses: actions/setup-java@v3.0.0 + 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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 99a29cb..e96d197 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,22 +1,21 @@ name: Release -"on": - workflow_dispatch: {} +"on": workflow_dispatch jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.4.0 with: token: ${{ secrets.GIT_ACTION_TOKEN }} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v4.1.0 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} git_user_signingkey: true git_commit_gpgsign: true - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3.0.0 with: distribution: temurin java-version: 11 diff --git a/.github/workflows/snapshot.yaml b/.github/workflows/snapshot.yaml index a1bd732..77a8038 100644 --- a/.github/workflows/snapshot.yaml +++ b/.github/workflows/snapshot.yaml @@ -2,32 +2,16 @@ name: Snapshot "on": workflow_dispatch: {} - push: {} + push: + branches: [main] + paths-ignore: ['**.md'] jobs: - - yaml: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: ibiqlik/action-yamllint@v3 - with: - format: colored - strict: true - - 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 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v2.4.0 + - uses: actions/setup-java@v3.0.0 with: distribution: temurin java-version: 11 @@ -36,14 +20,11 @@ jobs: server-username: SERVER_USERNAME server-password: SERVER_PASSWORD - run: mvn -B dependency:go-offline - - run: mvn -B verify - if: github.ref != 'refs/heads/main' - run: mvn -B deploy - if: github.ref == 'refs/heads/main' env: SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} - - uses: dorny/test-reporter@v1 + - uses: dorny/test-reporter@v1.5.0 if: failure() with: name: surefire @@ -51,3 +32,4 @@ jobs: reporter: java-junit list-suites: failed list-tests: failed + fail-on-error: false diff --git a/README.md b/README.md index e8875ee..d60bdc3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ [![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/kokuwaio/micronaut-logging.svg?label=License)](http://www.apache.org/licenses/) [![Maven Central](https://img.shields.io/maven-central/v/io.kokuwa.micronaut/micronaut-logging.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.kokuwa.micronaut%22%20AND%20a:%22micronaut-logging%22) -[![CI](https://img.shields.io/github/workflow/status/kokuwaio/micronaut-logging/Snapshot)](https://github.com/kokuwaio/micronaut-logging/actions/workflows/snapshot.yaml) +[![Build](https://img.shields.io/github/workflow/status/kokuwaio/micronaut-logging/Snapshot?label=Build)](https://github.com/kokuwaio/micronaut-logging/actions/workflows/snapshot.yaml?label=Build) +[![Lint](https://img.shields.io/github/workflow/status/kokuwaio/micronaut-logging/Lint?label=Lint)](https://github.com/kokuwaio/micronaut-logging/actions/workflows/lint.yaml?label=Lint) Include in your `pom.xml`: diff --git a/pom.xml b/pom.xml index c8e3623..802c204 100644 --- a/pom.xml +++ b/pom.xml @@ -87,26 +87,27 @@ 3.1.2 3.1.0 - 3.9.0 + 3.10.0 + 3.2.0 3.0.0-M2 3.0.1 3.0.0-M1 - 3.3.1 + 3.3.2 3.2.2 3.0.0-M5 3.2.0 3.2.1 3.0.0-M5 1.1.0 - 1.6.8 - 9.3 - 0.5.6 + 1.6.12 + 10.0 + 0.5.5 1.2.10 0.1.5 - 3.3.0 + 3.3.4 @@ -238,6 +239,11 @@ + + org.apache.maven.plugins + maven-dependency-plugin + ${version.org.apache.maven.plugins.dependency_} + org.apache.maven.plugins maven-deploy-plugin