Skip to content

Commit 09405a5

Browse files
committed
Fix github actions and repository setup
1 parent 225fbb1 commit 09405a5

12 files changed

+116
-61
lines changed

.github.settings.xml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<settings>
2-
<servers>
3-
<server>
4-
<id>nexus-snapshots</id>
5-
<username>${env.MAVEN_REPO_USERNAME}</username>
6-
<password>${env.MAVEN_REPO_PASSWORD}</password>
7-
</server>
8-
<server>
9-
<id>nexus-releases</id>
10-
<username>${env.MAVEN_REPO_USERNAME}</username>
11-
<password>${env.MAVEN_REPO_PASSWORD}</password>
12-
</server>
13-
</servers>
2+
<servers>
3+
<server>
4+
<id>nexus-snapshots</id>
5+
<username>${env.MAVEN_REPO_USERNAME}</username>
6+
<password>${env.MAVEN_REPO_PASSWORD}</password>
7+
</server>
8+
<server>
9+
<id>nexus-releases</id>
10+
<username>${env.MAVEN_REPO_USERNAME}</username>
11+
<password>${env.MAVEN_REPO_PASSWORD}</password>
12+
</server>
13+
</servers>
1414
</settings>

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* @qbicsoftware/itss
2+

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build_package.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,26 @@ on:
66
- '**'
77
pull_request:
88
# The branches below must be a subset of the branches above
9-
branches: [ main, master ]
9+
branches: [ main ]
10+
1011
jobs:
1112
package:
1213
runs-on: ubuntu-latest
1314

1415
steps:
15-
- uses: actions/checkout@v2
16-
- name: Set up JDK 1.17
17-
uses: actions/setup-java@v1
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Set up JDK 11
19+
uses: actions/setup-java@v4
1820
with:
19-
java-version: 1.17
20-
21+
distribution: 'zulu'
22+
java-version: '11'
2123
- name: Load local Maven repository cache
22-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2325
with:
2426
path: ~/.m2/repository
2527
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2628
restore-keys: |
2729
${{ runner.os }}-maven-
28-
2930
- name: Run mvn package
3031
run: mvn -B package --file pom.xml

.github/workflows/codeql-analysis.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main, master, development, release/*, hotfix/* ]
16+
branches: [ main, development, release/*, hotfix/* ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ main, master ]
19+
branches: [ main ]
2020
schedule:
2121
- cron: '21 1 * * 4'
2222

2323
jobs:
2424
analyze:
25-
name: analyze
2625
runs-on: ubuntu-latest
2726
permissions:
2827
actions: read
@@ -38,15 +37,16 @@ jobs:
3837

3938
steps:
4039
- name: Checkout repository
41-
uses: actions/checkout@v2
42-
- name: Set up JDK 1.17
43-
uses: actions/setup-java@v1
40+
uses: actions/checkout@v4
41+
- name: Set up JDK 11
42+
uses: actions/setup-java@v4
4443
with:
45-
java-version: 1.17
44+
distribution: 'zulu'
45+
java-version: '11'
4646
settings-path: ${{ github.workspace }}
4747

4848
- name: Load local Maven repository cache
49-
uses: actions/cache@v2
49+
uses: actions/cache@v4
5050
with:
5151
path: ~/.m2/repository
5252
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -55,7 +55,7 @@ jobs:
5555
5656
# Initializes the CodeQL tools for scanning.
5757
- name: Initialize CodeQL
58-
uses: github/codeql-action/init@v1
58+
uses: github/codeql-action/init@v3
5959
with:
6060
languages: ${{ matrix.language }}
6161
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -66,7 +66,7 @@ jobs:
6666
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6767
# If this step fails, then you should remove it and run the build manually (see below)
6868
- name: Autobuild
69-
uses: github/codeql-action/autobuild@v1
69+
uses: github/codeql-action/autobuild@v3
7070

7171
# ℹ️ Command-line programs to run using the OS shell.
7272
# 📚 https://git.io/JvXDl
@@ -80,4 +80,4 @@ jobs:
8080
# make release
8181

8282
- name: Perform CodeQL Analysis
83-
uses: github/codeql-action/analyze@v1
83+
uses: github/codeql-action/analyze@v3

.github/workflows/create-release.yml

+12-10
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ jobs:
1111
release:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up JDK 1.17
16-
uses: actions/setup-java@v1
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
- name: Set up JDK 11
17+
uses: actions/setup-java@v4
1718
with:
18-
java-version: 1.17
19+
distribution: 'zulu'
20+
java-version: '11'
1921
settings-path: ${{ github.workspace }}
2022

2123
- name: Load local Maven repository cache
22-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2325
with:
2426
path: ~/.m2/repository
2527
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -32,17 +34,17 @@ jobs:
3234
git config --global user.name "JohnnyQ5"
3335
3436
- name: Set version in Maven project
35-
run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }}
37+
run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }}
3638

3739
- name: Build with Maven
38-
run: mvn -B package --file pom.xml
40+
run: mvn -B package --file pom.xml
3941

4042
- name: Create Release Notes
4143
if: ${{ !startsWith(github.ref, 'refs/tags/')
4244
&& !( contains(github.event.inputs.versionTag, 'alpha')
4345
|| contains(github.event.inputs.versionTag, 'beta')
4446
|| contains(github.event.inputs.versionTag, 'rc')) }}
45-
uses: actions/github-script@v4.0.2
47+
uses: actions/github-script@v7
4648
with:
4749
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
4850
script: |
@@ -56,7 +58,7 @@ jobs:
5658
&& ( contains(github.event.inputs.versionTag, 'alpha')
5759
|| contains(github.event.inputs.versionTag, 'beta')
5860
|| contains(github.event.inputs.versionTag, 'rc')) }}
59-
uses: actions/github-script@v4.0.2
61+
uses: actions/github-script@v7
6062
with:
6163
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
6264
script: |
@@ -85,7 +87,7 @@ jobs:
8587
run: git push
8688

8789
- name: Open PR with version bump
88-
uses: actions/github-script@v4.0.2
90+
uses: actions/github-script@v7
8991
with:
9092
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
9193
script: |
+7-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
name: Label Pull Requests
22

3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
37
on:
48
pull_request:
59
types: [ opened, edited ]
610

711
jobs:
8-
label:
12+
Assign-Label-To-Pull-Request:
913
runs-on: ubuntu-latest
1014
steps:
11-
- uses: TimonVS/pr-labeler-action@v3
15+
- uses: actions/labeler@v5.0.0-alpha.1
1216
with:
13-
configuration-path: .github/pr-labels.yml # optional, .github/pr-labeler.yml is the default value
14-
env:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/labeler.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
feature:
2+
- any:
3+
- head-branch: [ '^feature' ]
4+
fix:
5+
- any:
6+
- head-branch: [ '^fix', '^hotfix' ]
7+
chore:
8+
- any:
9+
- head-branch: [ '^chore', '^documentation', '^docs', '^ci', '^refactor' ]
10+
release:
11+
- all:
12+
- base-branch: [ 'main', 'master' ]
13+
- head-branch: [ 'development', 'dev' ]

.github/workflows/nexus-publish-snapshots.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ on:
1010
- development
1111

1212
jobs:
13-
publish_snapshots:
13+
publish_snapshot:
1414

1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v2
19-
- name: Set up JDK 1.17
20-
uses: actions/setup-java@v1
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
- name: Set up JDK 11
21+
uses: actions/setup-java@v4
2122
with:
22-
java-version: 1.17
23+
distribution: 'zulu'
24+
java-version: '11'
2325
settings-path: ${{ github.workspace }}
2426

2527
- name: Load local Maven repository cache
26-
uses: actions/cache@v2
28+
uses: actions/cache@v4
2729
with:
2830
path: ~/.m2/repository
2931
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -34,13 +36,13 @@ jobs:
3436
run: mvn versions:set -DremoveSnapshot
3537
# Set the SNAPSHOT for this build and deployment
3638
- name: Set version in Maven project
37-
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT'
39+
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT'
3840

3941
- name: Build with Maven
4042
run: mvn -B package --file pom.xml
4143

4244
- name: Publish artefact to QBiC Nexus Repository
43-
run: mvn --settings $GITHUB_WORKSPACE/.github.settings.xml deploy
45+
run: mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml deploy
4446
env:
4547
MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }}
4648
MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

.github/workflows/release.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- JohnnyQ5
7+
- github-actions
8+
categories:
9+
- title: New Features 🚀
10+
labels:
11+
- feature
12+
- title: Bugfixes 🪲
13+
labels:
14+
- fix
15+
- title: Documentation & CI 🪂
16+
labels:
17+
- chore
18+
- title: Others 🧃
19+
labels:
20+
- "*"

.github/workflows/run_tests.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,24 @@ on:
66
- '**'
77
pull_request:
88
# The branches below must be a subset of the branches above
9-
branches: [ main, master ]
9+
branches: [ main ]
1010

1111
jobs:
1212
test:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 1.17
18-
uses: actions/setup-java@v1
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Set up JDK 11
19+
uses: actions/setup-java@v4
1920
with:
20-
java-version: 1.17
21+
distribution: 'zulu'
22+
java-version: '11'
23+
settings-path: ${{ github.workspace }}
2124

2225
- name: Load local Maven repository cache
23-
uses: actions/cache@v2
26+
uses: actions/cache@v4
2427
with:
2528
path: ~/.m2/repository
2629
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 QBiC
3+
Copyright (c) 2024, University of Tuebingen
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)