Skip to content

Commit c77ac4b

Browse files
authored
Update GitHub Actions (#247)
Updates all actions to the latest version using node.js 16. The label action was replaced by a maintained action.
1 parent 070a607 commit c77ac4b

10 files changed

+92
-57
lines changed

.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/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/pr-labels.yml

-3
This file was deleted.

.github/workflows/build_package.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@ jobs:
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@v3
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v3
1920
with:
20-
java-version: 1.17
21+
distribution: 'zulu'
22+
java-version: '17'
2123
- name: Load local Maven repository cache
22-
uses: actions/cache@v2
24+
uses: actions/cache@v3
2325
with:
2426
path: ~/.m2/repository
2527
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2628
restore-keys: |
2729
${{ runner.os }}-maven-
2830
- name: Run mvn package
29-
run: VAADIN_OFFLINE_KEY=${{ secrets.VAADIN_SERVER_23_2 }} mvn -B package --file pom.xml
31+
run: mvn -B package --file pom.xml

.github/workflows/codeql-analysis.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ jobs:
3737

3838
steps:
3939
- name: Checkout repository
40-
uses: actions/checkout@v2
41-
- name: Set up JDK 1.17
42-
uses: actions/setup-java@v1
40+
uses: actions/checkout@v3
41+
- name: Set up JDK 17
42+
uses: actions/setup-java@v3
4343
with:
44-
java-version: 1.17
44+
distribution: 'zulu'
45+
java-version: '17'
4546
settings-path: ${{ github.workspace }}
4647

4748
- name: Load local Maven repository cache
48-
uses: actions/cache@v2
49+
uses: actions/cache@v3
4950
with:
5051
path: ~/.m2/repository
5152
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -54,7 +55,7 @@ jobs:
5455
5556
# Initializes the CodeQL tools for scanning.
5657
- name: Initialize CodeQL
57-
uses: github/codeql-action/init@v1
58+
uses: github/codeql-action/init@v2
5859
with:
5960
languages: ${{ matrix.language }}
6061
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -65,7 +66,7 @@ jobs:
6566
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6667
# If this step fails, then you should remove it and run the build manually (see below)
6768
- name: Autobuild
68-
uses: github/codeql-action/autobuild@v1
69+
uses: github/codeql-action/autobuild@v2
6970

7071
# ℹ️ Command-line programs to run using the OS shell.
7172
# 📚 https://git.io/JvXDl
@@ -79,4 +80,4 @@ jobs:
7980
# make release
8081

8182
- name: Perform CodeQL Analysis
82-
uses: github/codeql-action/analyze@v1
83+
uses: github/codeql-action/analyze@v2

.github/workflows/create-release.yml

+16-10
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,54 @@ 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@v3
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v3
1718
with:
18-
java-version: 1.17
19+
distribution: 'zulu'
20+
java-version: '17'
1921
settings-path: ${{ github.workspace }}
2022

2123
- name: Load local Maven repository cache
22-
uses: actions/cache@v2
24+
uses: actions/cache@v3
2325
with:
2426
path: ~/.m2/repository
2527
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2628
restore-keys: |
2729
${{ runner.os }}-maven-
30+
2831
- name: Set up git
2932
run: |
3033
git config --global user.email "[email protected]"
3134
git config --global user.name "JohnnyQ5"
35+
3236
- name: Set version in Maven project
3337
run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }}
3438

3539
- name: Build with Maven
36-
run: VAADIN_OFFLINE_KEY=${{ secrets.VAADIN_SERVER_23_2 }} mvn -B package -Pproduction --file pom.xml
40+
run: mvn -B package --file pom.xml
3741

3842
- name: Create Release Notes
3943
if: ${{ !startsWith(github.ref, 'refs/tags/')
4044
&& !( contains(github.event.inputs.versionTag, 'alpha')
4145
|| contains(github.event.inputs.versionTag, 'beta')
4246
|| contains(github.event.inputs.versionTag, 'rc')) }}
43-
uses: actions/github-script@v4.0.2
47+
uses: actions/github-script@v6
4448
with:
4549
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
4650
script: |
4751
await github.request(`POST /repos/${{ github.repository }}/releases`, {
4852
tag_name: "${{ github.event.inputs.versionTag }}",
4953
generate_release_notes: true
5054
});
55+
5156
- name: Create Pre-Release Notes
5257
if: ${{ !startsWith(github.ref, 'refs/tags/')
5358
&& ( contains(github.event.inputs.versionTag, 'alpha')
5459
|| contains(github.event.inputs.versionTag, 'beta')
5560
|| contains(github.event.inputs.versionTag, 'rc')) }}
56-
uses: actions/github-script@v4.0.2
61+
uses: actions/github-script@v6
5762
with:
5863
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
5964
script: |
@@ -62,8 +67,9 @@ jobs:
6267
generate_release_notes: true,
6368
prerelease: true
6469
});
70+
6571
- name: Publish artefact to QBiC Nexus Repository
66-
run: mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml jar:jar deploy:deploy
72+
run: mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml deploy
6773
env:
6874
MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }}
6975
MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
@@ -81,7 +87,7 @@ jobs:
8187
run: git push
8288

8389
- name: Open PR with version bump
84-
uses: actions/github-script@v4.0.2
90+
uses: actions/github-script@v6
8591
with:
8692
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
8793
script: |

.github/workflows/label-pull-request.yml

-15
This file was deleted.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Label Pull Requests
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
7+
on:
8+
pull_request:
9+
types: [ opened, edited ]
10+
11+
jobs:
12+
Assign-Label-To-Pull-Request:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/[email protected]
16+
with:
17+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

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

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# qbic-repo.qbic.uni-tuebingen.de packages when a release is created
33
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
44

5-
name: Nexus Package
5+
name: Deploy Snapshot
66

77
on:
88
push:
@@ -15,16 +15,17 @@ jobs:
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@v3
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v3
2122
with:
22-
java-version: 1.17
23-
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
23+
distribution: 'zulu'
24+
java-version: '17'
2425
settings-path: ${{ github.workspace }}
2526

2627
- name: Load local Maven repository cache
27-
uses: actions/cache@v2
28+
uses: actions/cache@v3
2829
with:
2930
path: ~/.m2/repository
3031
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -38,11 +39,10 @@ jobs:
3839
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT'
3940

4041
- name: Build with Maven
41-
run: VAADIN_OFFLINE_KEY=${{ secrets.VAADIN_SERVER_23_2 }} mvn -B package --file pom.xml
42+
run: mvn -B package --file pom.xml
4243

4344
- name: Publish artefact to QBiC Nexus Repository
44-
run: mvn --quiet --activate-profiles development-build,!release-build --settings $GITHUB_WORKSPACE/.github.settings.xml deploy
45+
run: mvn --settings $GITHUB_WORKSPACE/.github.settings.xml deploy
4546
env:
4647
MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }}
4748
MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
48-

.github/workflows/run_tests.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ jobs:
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@v3
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v3
1920
with:
20-
java-version: 1.17
21+
distribution: 'zulu'
22+
java-version: '17'
23+
settings-path: ${{ github.workspace }}
2124

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

0 commit comments

Comments
 (0)