Skip to content

Commit 5b71018

Browse files
committed
Merge remote-tracking branch 'origin/update-from-template'
2 parents b5ca27f + a9590eb commit 5b71018

File tree

7 files changed

+87
-36
lines changed

7 files changed

+87
-36
lines changed

.github/workflows/broken-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title \"Link Checker Report\"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT
3030
env:
3131
GH_TOKEN: ${{ github.token }}
32-
32+
3333
- name: Close issue if everything is fine
3434
if: steps.lychee.outputs.exit_code == 0 && steps.find-issue.outputs.number != ''
3535
run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }}

.github/workflows/check-build.yml

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,27 @@ jobs:
2626
build:
2727
runs-on: ubuntu-latest
2828
timeout-minutes: 30
29-
3029
strategy:
3130
matrix:
3231
java: [17, 21]
3332
distribution: [temurin]
34-
3533
steps:
3634
- uses: actions/checkout@v5
37-
35+
3836
- name: Set up JDK
3937
uses: actions/setup-java@v5
4038
with:
4139
distribution: ${{ matrix.distribution }}
4240
java-version: ${{ matrix.java }}
43-
cache: 'maven'
44-
41+
42+
- name: Cache Maven
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.m2/repository
46+
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
47+
restore-keys: |
48+
${{ runner.os }}-mvn-build-
49+
4550
- name: Cache Vaadin prod bundles
4651
uses: actions/cache@v4
4752
with:
@@ -50,10 +55,10 @@ jobs:
5055
key: ${{ runner.os }}-vaadin-prod-bundles-${{ hashFiles('**/pom.xml') }}
5156
restore-keys: |
5257
${{ runner.os }}-vaadin-prod-bundles-
53-
58+
5459
- name: Build with Maven
55-
run: ./mvnw -B clean package -Pproduction
56-
60+
run: ./mvnw -B clean package
61+
5762
- name: Check for uncommited changes
5863
run: |
5964
if [[ "$(git status --porcelain)" != "" ]]; then
@@ -83,21 +88,34 @@ jobs:
8388
runs-on: ubuntu-latest
8489
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
8590
timeout-minutes: 15
86-
8791
strategy:
8892
matrix:
8993
java: [17]
9094
distribution: [temurin]
91-
9295
steps:
9396
- uses: actions/checkout@v5
94-
97+
9598
- name: Set up JDK
9699
uses: actions/setup-java@v5
97100
with:
98101
distribution: ${{ matrix.distribution }}
99102
java-version: ${{ matrix.java }}
100-
cache: 'maven'
103+
104+
- name: Cache Maven
105+
uses: actions/cache@v4
106+
with:
107+
path: ~/.m2/repository
108+
key: ${{ runner.os }}-mvn-checkstyle-${{ hashFiles('**/pom.xml') }}
109+
restore-keys: |
110+
${{ runner.os }}-mvn-checkstyle-
111+
112+
- name: CheckStyle Cache
113+
uses: actions/cache@v4
114+
with:
115+
path: '**/target/checkstyle-cachefile'
116+
key: ${{ runner.os }}-checkstyle-${{ hashFiles('**/pom.xml') }}
117+
restore-keys: |
118+
${{ runner.os }}-checkstyle-
101119
102120
- name: Run Checkstyle
103121
run: ./mvnw -B checkstyle:check -P checkstyle -T2C
@@ -106,12 +124,10 @@ jobs:
106124
runs-on: ubuntu-latest
107125
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
108126
timeout-minutes: 15
109-
110127
strategy:
111128
matrix:
112129
java: [17]
113130
distribution: [temurin]
114-
115131
steps:
116132
- uses: actions/checkout@v5
117133

@@ -120,7 +136,22 @@ jobs:
120136
with:
121137
distribution: ${{ matrix.distribution }}
122138
java-version: ${{ matrix.java }}
123-
cache: 'maven'
139+
140+
- name: Cache Maven
141+
uses: actions/cache@v4
142+
with:
143+
path: ~/.m2/repository
144+
key: ${{ runner.os }}-mvn-pmd-${{ hashFiles('**/pom.xml') }}
145+
restore-keys: |
146+
${{ runner.os }}-mvn-pmd-
147+
148+
- name: PMD Cache
149+
uses: actions/cache@v4
150+
with:
151+
path: '**/target/pmd/pmd.cache'
152+
key: ${{ runner.os }}-pmd-${{ hashFiles('**/pom.xml') }}
153+
restore-keys: |
154+
${{ runner.os }}-pmd-
124155
125156
- name: Run PMD
126157
run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -DskipTests -T2C

.github/workflows/release.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,30 @@ permissions:
1111
contents: write
1212
pull-requests: write
1313

14+
# DO NOT RESTORE CACHE for critical release steps to prevent a (extremely unlikely) scenario
15+
# where a supply chain attack could be achieved due to poisoned cache
1416
jobs:
1517
check-code:
1618
runs-on: ubuntu-latest
1719
timeout-minutes: 30
1820
steps:
1921
- uses: actions/checkout@v5
20-
22+
2123
- name: Set up JDK
2224
uses: actions/setup-java@v5
2325
with:
2426
java-version: '17'
2527
distribution: 'temurin'
26-
cache: 'maven'
27-
28+
29+
# Try to reuse existing cache from check-build
30+
- name: Try restore Maven Cache
31+
uses: actions/cache/restore@v4
32+
with:
33+
path: ~/.m2/repository
34+
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
35+
restore-keys: |
36+
${{ runner.os }}-mvn-build-
37+
2838
- name: Build with Maven
2939
run: ./mvnw -B clean package -Pproduction -T2C
3040

@@ -54,31 +64,31 @@ jobs:
5464
upload_url: ${{ steps.create-release.outputs.upload_url }}
5565
steps:
5666
- uses: actions/checkout@v5
57-
67+
5868
- name: Configure Git
5969
run: |
6070
git config --global user.email "[email protected]"
6171
git config --global user.name "GitHub Actions"
62-
72+
6373
- name: Un-SNAP
6474
run: ./mvnw -B versions:set -DremoveSnapshot -DprocessAllModules -DgenerateBackupPoms=false
65-
75+
6676
- name: Get version
6777
id: version
6878
run: |
6979
version=$(../mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
7080
echo "release=$version" >> $GITHUB_OUTPUT
7181
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
7282
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
73-
83+
7484
- name: Commit and Push
7585
run: |
7686
git add -A
7787
git commit -m "Release ${{ steps.version.outputs.release }}"
7888
git push origin
7989
git tag v${{ steps.version.outputs.release }}
8090
git push origin --tags
81-
91+
8292
- name: Create Release
8393
id: create-release
8494
uses: shogo82148/actions-create-release@4661dc54f7b4b564074e9fbf73884d960de569a3 # v1
@@ -109,7 +119,7 @@ jobs:
109119
timeout-minutes: 60
110120
steps:
111121
- uses: actions/checkout@v5
112-
122+
113123
- name: Init Git and pull
114124
run: |
115125
git config --global user.email "[email protected]"
@@ -125,7 +135,7 @@ jobs:
125135
server-password: PACKAGES_CENTRAL_TOKEN
126136
gpg-passphrase: MAVEN_GPG_PASSPHRASE
127137
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once
128-
138+
129139
- name: Publish to GitHub Packages Central
130140
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
131141
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
@@ -157,7 +167,7 @@ jobs:
157167
timeout-minutes: 15
158168
steps:
159169
- uses: actions/checkout@v5
160-
170+
161171
- name: Init Git and pull
162172
run: |
163173
git config --global user.email "[email protected]"
@@ -169,7 +179,15 @@ jobs:
169179
with:
170180
java-version: '17'
171181
distribution: 'temurin'
172-
cache: 'maven'
182+
183+
# Try to reuse existing cache from check-build
184+
- name: Try restore Maven Cache
185+
uses: actions/cache/restore@v4
186+
with:
187+
path: ~/.m2/repository
188+
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
189+
restore-keys: |
190+
${{ runner.os }}-mvn-build-
173191
174192
- name: Build site
175193
run: ../mvnw -B compile site -DskipTests -T2C
@@ -188,7 +206,7 @@ jobs:
188206
timeout-minutes: 10
189207
steps:
190208
- uses: actions/checkout@v5
191-
209+
192210
- name: Init Git and pull
193211
run: |
194212
git config --global user.email "[email protected]"
@@ -203,7 +221,7 @@ jobs:
203221
git add -A
204222
git commit -m "Preparing for next development iteration"
205223
git push origin
206-
224+
207225
- name: pull-request
208226
env:
209227
GH_TOKEN: ${{ github.token }}

.github/workflows/test-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
server-password: PACKAGES_CENTRAL_TOKEN
2323
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2424
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once
25-
25+
2626
- name: Publish to GitHub Packages Central
2727
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
2828
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
2929
env:
3030
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
3131
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
32-
32+
3333
- name: Set up JDK
3434
uses: actions/setup-java@v5
3535
with: # running setup-java again overwrites the settings.xml

.github/workflows/update-from-template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# If no PAT is used the following error occurs on a push:
4444
# refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission
4545
token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }}
46-
46+
4747
- name: Init Git
4848
run: |
4949
git config --global user.email "[email protected]"
@@ -190,7 +190,7 @@ jobs:
190190
# If no PAT is used the following error occurs on a push:
191191
# refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission
192192
token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }}
193-
193+
194194
- name: Init Git
195195
run: |
196196
git config --global user.email "[email protected]"

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>11.0.0</version>
48+
<version>11.0.1</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>
@@ -72,6 +72,7 @@
7272
<artifactId>maven-pmd-plugin</artifactId>
7373
<version>3.27.0</version>
7474
<configuration>
75+
<analysisCache>true</analysisCache>
7576
<includeTests>true</includeTests>
7677
<printFailingErrors>true</printFailingErrors>
7778
<rulesets>

template-placeholder/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
<dependency>
262262
<groupId>com.puppycrawl.tools</groupId>
263263
<artifactId>checkstyle</artifactId>
264-
<version>11.0.0</version>
264+
<version>11.0.1</version>
265265
</dependency>
266266
</dependencies>
267267
<configuration>
@@ -288,6 +288,7 @@
288288
<artifactId>maven-pmd-plugin</artifactId>
289289
<version>3.27.0</version>
290290
<configuration>
291+
<analysisCache>true</analysisCache>
291292
<includeTests>true</includeTests>
292293
<printFailingErrors>true</printFailingErrors>
293294
<rulesets>

0 commit comments

Comments
 (0)