Skip to content

Commit 10e3d87

Browse files
committed
Update github actions
* checkout action: update to v6 * java action: update to v5, and update java version to 17 * maven-settings-xml-action: update to v22
1 parent 72d37ea commit 10e3d87

3 files changed

Lines changed: 38 additions & 23 deletions

File tree

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
version: 2
6+
updates:
7+
- package-ecosystem: "maven" # See documentation for possible values
8+
directory: "/" # Location of package manifests
9+
schedule:
10+
interval: "weekly"
11+
12+
- package-ecosystem: "github-actions" # Also update Github actions
13+
directory: "/"
14+
schedule:
15+
# Check for updates to GitHub Actions every week
16+
interval: "weekly"

.github/workflows/maven-push.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616

1717
name: maven push
1818

19-
on: [push]
19+
on:
20+
push:
21+
branches:
22+
- 'main'
23+
- '1.x'
2024

2125
jobs:
2226
build:
@@ -25,29 +29,22 @@ jobs:
2529
env:
2630
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
2731
steps:
28-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v6
2933

3034
- name: Set up JDK 11 for x64
31-
uses: actions/setup-java@v3
35+
uses: actions/setup-java@v5
3236
with:
33-
java-version: '11'
37+
java-version: '17'
3438
distribution: 'temurin'
3539
architecture: x64
3640

37-
- uses: s4u/maven-settings-action@v2.8.0
41+
- name: maven-settings-xml-action
42+
uses: whelk-io/maven-settings-xml-action@v22
43+
if: ${{ github.event.repository.fork == false }}
3844
with:
39-
sonatypeSnapshots: true
40-
41-
- uses: s4u/maven-settings-action@v2.8.0
42-
if: ${{ github.event_name == 'push' }}
43-
with:
44-
servers: |
45-
[{
46-
"id": "central-portal-snapshots",
47-
"username": "${{ secrets.SONATYPE_BOT_USERNAME }}",
48-
"password": "${{ secrets.SONATYPE_BOT_TOKEN }}"
49-
}]
50-
45+
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'
46+
servers: '[{ "id": "sonatype", "username": "${{ secrets.SONATYPE_BOT_USERNAME}}", "password": "${{ secrets.SONATYPE_BOT_TOKEN}}" }]'
47+
5148
- name: Deploy the artifact
5249
if: ${{ github.event_name == 'push' }}
5350
run: mvn help:effective-settings -B -V clean deploy -e

.github/workflows/maven-verify.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,20 @@ jobs:
2525
env:
2626
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v6
2929

30-
- name: Set up JDK 11 for x64
31-
uses: actions/setup-java@v3
30+
- name: Set up JDK
31+
uses: actions/setup-java@v5
3232
with:
33-
java-version: '11'
33+
java-version: '17'
3434
distribution: 'temurin'
3535
architecture: x64
3636

37-
- uses: s4u/maven-settings-action@v2.8.0
37+
- name: maven-settings-xml-action
38+
uses: whelk-io/maven-settings-xml-action@v22
3839
with:
39-
sonatypeSnapshots: true
40+
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'
41+
4042

4143
- name: Build the Maven verify phase
4244
run: mvn -B -V clean verify -Prun-its -Pci

0 commit comments

Comments
 (0)