From 6dbd0e5c0f18e04a2eee5bb7c2a6c63daedd31f2 Mon Sep 17 00:00:00 2001 From: Tobias Koch Date: Thu, 1 Jun 2023 16:01:14 +0200 Subject: [PATCH 1/3] Update GitHub Actions (#365) Updates all actions to the latest version using node.js 16. The label action was replaced by a maintained action. --- .github/dependabot.yml | 11 +++ .github/labeler.yml | 13 ++++ .github/pr-labels.yml | 3 - .github/workflows/build_package.yml | 12 +-- .github/workflows/codeql-analysis.yml | 76 +++++++++---------- .github/workflows/create-release.yml | 35 ++++----- .github/workflows/label-pull-request.yml | 15 ---- .github/workflows/label-pull-requests.yml | 17 +++++ .github/workflows/nexus-publish-snapshots.yml | 21 ++--- .github/workflows/run_tests.yml | 13 ++-- 10 files changed, 120 insertions(+), 96 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/labeler.yml delete mode 100644 .github/pr-labels.yml delete mode 100644 .github/workflows/label-pull-request.yml create mode 100644 .github/workflows/label-pull-requests.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..90e05c40d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..fdd0f42bb --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,13 @@ +feature: + - any: + - head-branch: [ '^feature' ] +fix: + - any: + - head-branch: [ '^fix', '^hotfix' ] +chore: + - any: + - head-branch: [ '^chore', '^documentation', '^docs', '^ci', '^refactor' ] +release: + - all: + - base-branch: [ 'main', 'master' ] + - head-branch: [ 'development', 'dev' ] diff --git a/.github/pr-labels.yml b/.github/pr-labels.yml deleted file mode 100644 index f95cf6e9d..000000000 --- a/.github/pr-labels.yml +++ /dev/null @@ -1,3 +0,0 @@ -feature: ['feature/*', 'feat/*'] -fix: ['fix/*', 'hotfix'] -chore: ['chore/*', 'documentation/*', 'docs/*', 'ci/*', 'refactor/*'] diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index d616186cc..77c5fe5c9 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -13,13 +13,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 with: - java-version: 1.8 + distribution: 'zulu' + java-version: '8' - name: Load local Maven repository cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d708ad0ff..1b1841d8d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,7 +22,6 @@ on: jobs: analyze: - name: analyze runs-on: ubuntu-latest permissions: actions: read @@ -37,47 +36,48 @@ jobs: # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - settings-path: ${{ github.workspace }} + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '8' + settings-path: ${{ github.workspace }} - - name: Load local Maven repository cache - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + - name: Load local Maven repository cache + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ebae60566..ed38abf1b 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -11,24 +11,28 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 with: - java-version: 1.8 + distribution: 'zulu' + java-version: '8' settings-path: ${{ github.workspace }} - name: Load local Maven repository cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- + - name: Set up git run: | git config --global user.email "support@qbic.zendesk.com" git config --global user.name "JohnnyQ5" + - name: Set version in Maven project run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }} @@ -40,7 +44,7 @@ jobs: && !( contains(github.event.inputs.versionTag, 'alpha') || contains(github.event.inputs.versionTag, 'beta') || contains(github.event.inputs.versionTag, 'rc')) }} - uses: actions/github-script@v4.0.2 + uses: actions/github-script@v6 with: github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | @@ -48,12 +52,13 @@ jobs: tag_name: "${{ github.event.inputs.versionTag }}", generate_release_notes: true }); + - name: Create Pre-Release Notes if: ${{ !startsWith(github.ref, 'refs/tags/') && ( contains(github.event.inputs.versionTag, 'alpha') || contains(github.event.inputs.versionTag, 'beta') || contains(github.event.inputs.versionTag, 'rc')) }} - uses: actions/github-script@v4.0.2 + uses: actions/github-script@v6 with: github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | @@ -62,6 +67,7 @@ jobs: generate_release_notes: true, prerelease: true }); + - name: Publish artefact to QBiC Nexus Repository run: mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml deploy env: @@ -81,23 +87,12 @@ jobs: run: git push - name: Open PR with version bump - uses: actions/github-script@v4.0.2 + uses: actions/github-script@v6 with: github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | await github.request(`POST /repos/${{ github.repository }}/pulls`, { title: 'Update version to ${{ github.event.inputs.versionTag }}', head: 'release/set-version-to-${{ github.event.inputs.versionTag }}', - base: 'master' - }); - - - name: Open PR to development - uses: actions/github-script@v4.0.2 - with: - github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} - script: | - await github.request(`POST /repos/${{ github.repository }}/pulls`, { - title: 'Merge release ${{ github.event.inputs.versionTag }} into development', - head: 'master', - base: 'development' + base: 'main' }); diff --git a/.github/workflows/label-pull-request.yml b/.github/workflows/label-pull-request.yml deleted file mode 100644 index b03eee147..000000000 --- a/.github/workflows/label-pull-request.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Label Pull Requests - -on: - pull_request: - types: [ opened, edited ] - -jobs: - label: - runs-on: ubuntu-latest - steps: - - uses: TimonVS/pr-labeler-action@v3 - with: - configuration-path: .github/pr-labels.yml # optional, .github/pr-labeler.yml is the default value - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/label-pull-requests.yml b/.github/workflows/label-pull-requests.yml new file mode 100644 index 000000000..931ff6da3 --- /dev/null +++ b/.github/workflows/label-pull-requests.yml @@ -0,0 +1,17 @@ +name: Label Pull Requests + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [ opened, edited ] + +jobs: + Assign-Label-To-Pull-Request: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5.0.0-alpha.1 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/nexus-publish-snapshots.yml b/.github/workflows/nexus-publish-snapshots.yml index 8b8c411c1..9d98c352e 100644 --- a/.github/workflows/nexus-publish-snapshots.yml +++ b/.github/workflows/nexus-publish-snapshots.yml @@ -2,7 +2,7 @@ # qbic-repo.qbic.uni-tuebingen.de packages when a release is created # For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path -name: Nexus Publish Snapshots +name: Deploy Snapshot on: push: @@ -10,21 +10,22 @@ on: - development jobs: - publish_snapshots: + publish_snapshot: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 with: - java-version: 1.8 - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + distribution: 'zulu' + java-version: '8' settings-path: ${{ github.workspace }} - + - name: Load local Maven repository cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -41,7 +42,7 @@ jobs: run: mvn -B package --file pom.xml - name: Publish artefact to QBiC Nexus Repository - run: mvn --quiet --activate-profiles development-build,!release-build --settings $GITHUB_WORKSPACE/.github.settings.xml deploy + run: mvn --settings $GITHUB_WORKSPACE/.github.settings.xml deploy env: MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }} MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 5708a2585..a5e328107 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -13,14 +13,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 with: - java-version: 1.8 + distribution: 'zulu' + java-version: '8' + settings-path: ${{ github.workspace }} - name: Load local Maven repository cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} From af8e4f43a9fb1d2880235881aeaecaa027acaa33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 09:44:59 +0000 Subject: [PATCH 2/3] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build_package.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-release.yml | 2 +- .github/workflows/nexus-publish-snapshots.yml | 2 +- .github/workflows/run_tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index 77c5fe5c9..a94b4feb8 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1b1841d8d..33f97b03f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ed38abf1b..006cd1cee 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/nexus-publish-snapshots.yml b/.github/workflows/nexus-publish-snapshots.yml index 9d98c352e..7eb969291 100644 --- a/.github/workflows/nexus-publish-snapshots.yml +++ b/.github/workflows/nexus-publish-snapshots.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index a5e328107..d7e27303c 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: From 9fb49d8eb6a35df134e89b4872699a3a9f31dd7e Mon Sep 17 00:00:00 2001 From: Steffengreiner Date: Tue, 19 Sep 2023 16:37:26 +0200 Subject: [PATCH 3/3] Release/set version to 2.26.0 (#367) * Set version to 2.26.0 * remove unnecessary newline to trigger PR checks again * remove unnecessary newline to trigger PR checks again --------- Co-authored-by: JohnnyQ5 --- README.md | 2 -- pom.xml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 6248a6522..fd879fb14 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ _Data Model Library - A collection of QBiC data models._ [![Run Maven Tests](https://github.com/qbicsoftware/data-model-lib/actions/workflows/run_tests.yml/badge.svg)](https://github.com/qbicsoftware/data-model-lib/actions/workflows/run_tests.yml) [![CodeQL](https://github.com/qbicsoftware/data-model-lib/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/qbicsoftware/data-model-lib/actions/workflows/codeql-analysis.yml) [![release](https://img.shields.io/github/v/release/qbicsoftware/data-model-lib?include_prereleases)](https://github.com/qbicsoftware/data-model-lib/releases) - [![license](https://img.shields.io/github/license/qbicsoftware/data-model-lib)](https://github.com/qbicsoftware/data-model-lib/blob/main/LICENSE) ![language](https://img.shields.io/badge/language-groovy,%20java-blue.svg) @@ -173,7 +172,6 @@ The following figure describes the entity relation of the imaging DTOs. Please have a look at the detailed JavaDoc class description of the DTOs. - ### Business Context - Offer Management The following figure describes the entity relation of the DTOs related to Offer Management. diff --git a/pom.xml b/pom.xml index 19fe41804..7a49a7639 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ life.qbic data-model-lib - 2.25.1 + 2.26.0 data-model-lib http://github.com/qbicsoftware/data-model-lib Data models. A collection of QBiC's central data models and DTOs.