Skip to content

Commit 247adf6

Browse files
authored
update workflows (#58)
Signed-off-by: Sebastian Hoß <[email protected]>
1 parent 244137e commit 247adf6

File tree

13 files changed

+202
-318
lines changed

13 files changed

+202
-318
lines changed

.github/actions/managed-java/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ runs:
1313
java-package: jdk
1414
architecture: x64
1515
distribution: temurin
16+
cache: maven

.github/actions/managed-maven/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ runs:
1313
java-package: jdk
1414
architecture: x64
1515
distribution: temurin
16+
cache: maven
1617
server-id: ossrh
1718
server-username: MAVEN_CENTRAL_USERNAME
1819
server-password: MAVEN_CENTRAL_TOKEN

.github/dependabot.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,9 @@ jobs:
1818
matrix:
1919
language: [ java ]
2020
steps:
21-
- id: checkout
22-
name: Checkout
21+
- name: Checkout repository
2322
uses: actions/checkout@v4
24-
- name: Set up Java
25-
uses: actions/setup-java@v4
26-
with:
27-
java-version: 17
28-
java-package: jdk
29-
architecture: x64
30-
distribution: temurin
31-
- name: Cache Maven Artifacts
32-
uses: actions/cache@v3
33-
with:
34-
path: ~/.m2/repository
35-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
36-
restore-keys: |
37-
${{ runner.os }}-maven-
23+
- uses: ./.github/actions/managed-java
3824
- name: Initialize CodeQL
3925
uses: github/codeql-action/init@v3
4026
with:

.github/workflows/dependabot-automerge.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Automated Release
55
on:
66
schedule:
7-
- cron: 27 4 * * TUE
7+
- cron: 35 3 * * WED
88
workflow_dispatch:
99
jobs:
1010
publish:
@@ -13,7 +13,7 @@ jobs:
1313
contents: write
1414
steps:
1515
- id: checkout
16-
name: Checkout
16+
name: Clone Git Repository
1717
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
@@ -24,7 +24,7 @@ jobs:
2424
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525
- id: commits
2626
name: Count Commits
27-
run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD)" >> $GITHUB_OUTPUT
27+
run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD -- pom.xml storage-units-dozer storage-units-eclipselink storage-units-gson storage-units-jackson storage-units-jakarta storage-units-mapstruct storage-units-model storage-units-modelmapper storage-units-mongodb storage-units-orika storage-units-simple)" >> $GITHUB_OUTPUT
2828
- id: release
2929
name: Create Release Version
3030
if: steps.commits.outputs.count > 0
@@ -38,33 +38,15 @@ jobs:
3838
if: steps.commits.outputs.count > 0
3939
run: echo "iso8601=$(date --utc --iso-8601=seconds)" >> $GITHUB_OUTPUT
4040
- id: setup-java
41-
name: Set up Java
41+
uses: ./.github/actions/managed-maven
4242
if: steps.commits.outputs.count > 0
43-
uses: actions/setup-java@v4
44-
with:
45-
java-version: 17
46-
java-package: jdk
47-
architecture: x64
48-
distribution: temurin
49-
server-id: ossrh
50-
server-username: MAVEN_CENTRAL_USERNAME
51-
server-password: MAVEN_CENTRAL_TOKEN
52-
- id: cache
53-
name: Cache Dependencies
54-
if: steps.commits.outputs.count > 0
55-
uses: actions/cache@v3
56-
with:
57-
path: ~/.m2/repository
58-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
59-
restore-keys: |
60-
${{ runner.os }}-maven-
6143
- id: gpg
6244
name: GPG Key
6345
if: steps.commits.outputs.count > 0
64-
uses: timheuer/base64-to-file@v1.2
46+
uses: timheuer/base64-to-file@v1
6547
with:
6648
fileName: signing.key.asc
67-
fileDir: ${{ github.workspace}}
49+
fileDir: ${{ github.workspace }}
6850
encodedString: ${{ secrets.GPG_SECRET_KEY_BASE64 }}
6951
- id: pom-version
7052
name: Set Release Version
@@ -108,7 +90,7 @@ jobs:
10890
password: ${{ secrets.MAIL_PASSWORD }}
10991
subject: ${{ github.event.repository.name }} version ${{ steps.release.outputs.version }} published
11092
body: See ${{ steps.create_release.outputs.url }} for details.
111-
93+
to: ${{ secrets.MAIL_RECIPIENT }}
11294
from: ${{ secrets.MAIL_SENDER }}
11395
- id: matrix
11496
name: Send Matrix Message
@@ -118,4 +100,4 @@ jobs:
118100
room_id: ${{ secrets.MATRIX_ROOM_ID }}
119101
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
120102
message: ${{ github.event.repository.name }} version [${{ steps.release.outputs.version }}](${{ steps.create_release.outputs.url }}) published
121-
server: matrix.org
103+
server: ${{ secrets.MATRIX_SERVER }}

.github/workflows/reuse.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33

44
name: REUSE compliance
55
on:
6-
push:
7-
branches: [ main ]
86
pull_request:
97
branches: [ main ]
108
jobs:
119
reuse:
1210
runs-on: ubuntu-latest
1311
steps:
14-
- id: checkout
15-
name: Checkout
16-
uses: actions/checkout@v4
12+
- uses: actions/checkout@v4
1713
- name: REUSE Compliance Check
1814
uses: fsfe/reuse-action@v2

.github/workflows/update-parent.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ jobs:
1212
- name: Clone Git Repository
1313
uses: actions/checkout@v4
1414
- uses: ./.github/actions/managed-java
15-
- uses: actions/cache@v3
16-
with:
17-
path: ~/.m2/repository
18-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
19-
restore-keys: |
20-
${{ runner.os }}-maven-
2115
- name: Update Parent
2216
run: mvn --batch-mode --define generateBackupPoms=false versions:update-parent
2317
- id: cpr
@@ -31,14 +25,16 @@ jobs:
3125
title: Update parent to latest version
3226
body: |
3327
`mvn --batch-mode --define generateBackupPoms=false versions:update-parent`
34-
assignees: sebhoss
28+
labels: |
29+
enhancement
30+
assignees: |
31+
sebhoss
3532
draft: false
3633
base: main
3734
branch: update-parent
3835
delete-branch: true
39-
- id: automerge
40-
name: Enable Pull Request Automerge
36+
- name: Enable Pull Request Automerge
4137
if: steps.cpr.outputs.pull-request-operation == 'created'
42-
run: gh pr merge --rebase --auto "${{ steps.cpr.outputs.pull-request-number }}"
38+
run: gh pr merge --rebase --auto ${{ steps.cpr.outputs.pull-request-number }}
4339
env:
4440
GH_TOKEN: ${{ secrets.PAT }}

.github/workflows/verify.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,14 @@
33

44
name: Verify Commits
55
on:
6-
push:
7-
branches: [ main ]
86
pull_request:
97
branches: [ main ]
10-
env:
11-
JAVA_VERSION: 17
12-
JAVA_PACKAGE: jdk
13-
JAVA_ARCH: x64
14-
JAVA_DISTRO: temurin
158
jobs:
16-
build:
17-
name: Build Project
9+
verify:
1810
runs-on: ubuntu-latest
1911
steps:
20-
- id: checkout
21-
name: Checkout
12+
- name: Clone Git Repository
2213
uses: actions/checkout@v4
23-
- id: java
24-
name: Setup Java
25-
uses: actions/setup-java@v4
26-
with:
27-
java-version: ${{ env.JAVA_VERSION }}
28-
java-package: ${{ env.JAVA_PACKAGE }}
29-
architecture: ${{ env.JAVA_ARCH }}
30-
distribution: ${{ env.JAVA_DISTRO }}
31-
- id: cache
32-
name: Cache Maven Repository
33-
uses: actions/cache@v3
34-
with:
35-
path: ~/.m2/repository
36-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
37-
restore-keys: |
38-
${{ runner.os }}-maven-
39-
- id: maven
40-
name: Maven Verify
14+
- uses: ./.github/actions/managed-java
15+
- name: Build with Maven
4116
run: mvn --batch-mode verify

0 commit comments

Comments
 (0)