Skip to content

Commit 761455f

Browse files
committed
Some workflow improvements
* Use `temurin` distribution for Java: the `adopt` is deprecated * Use `setup-java` for `releaseVersion` job to avoid Maven Gradle downloads when perform their wrappers * Use `@main` version for the `aurelien-baudet/workflow-dispatch` action to be able to use `workflow-logs: print`
1 parent df4ff17 commit 761455f

5 files changed

+13
-10
lines changed

.github/workflows/spring-artifactory-maven-release-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Set up JDK
4646
uses: actions/setup-java@v3
4747
with:
48-
distribution: adopt
48+
distribution: temurin
4949
java-version: 17
5050
cache: 'maven'
5151

.github/workflows/spring-artifactory-maven-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up JDK
2727
uses: actions/setup-java@v3
2828
with:
29-
distribution: adopt
29+
distribution: temurin
3030
java-version: 17
3131
cache: 'maven'
3232

.github/workflows/spring-artifactory-release.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,22 @@ jobs:
5454
with:
5555
show-progress: false
5656

57+
- uses: actions/setup-java@v3
58+
with:
59+
distribution: temurin
60+
java-version: 17
61+
5762
- name: Find Current Version to Release
5863
id: release-version
5964
run: |
6065
if test -f pom.xml
6166
then
62-
CURRENT_VERSION=$(./mvnw help:evaluate -Dexpression="project.version" -q -DforceStdout)
67+
CURRENT_VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
6368
else
64-
CURRENT_VERSION=$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')
69+
CURRENT_VERSION=$(gradle properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')
6570
fi
66-
echo $CURRENT_VERSION
6771
export CANDIDATE_VERSION=${CURRENT_VERSION/-SNAPSHOT}
68-
echo $CANDIDATE_VERSION
6972
RELEASE_VERSION=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq 'map(select(.title | startswith(env.CANDIDATE_VERSION))) | .[0] | .title')
70-
echo $RELEASE_VERSION
7173
if [ -z $RELEASE_VERSION ]
7274
then
7375
gh run cancel ${{ github.run_id }}
@@ -93,11 +95,12 @@ jobs:
9395
steps:
9496

9597
- name: Call smoke tests workflow
96-
uses: aurelien-baudet/workflow-dispatch@v2
98+
uses: aurelien-baudet/workflow-dispatch@main
9799
with:
98100
workflow: ${{ inputs.verifyStagedWorkflow }}
99101
wait-for-completion-interval: 30s
100102
display-workflow-run-url-interval: 5s
103+
workflow-logs: print
101104
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
102105
inputs: '{ "releaseVersion": "${{ needs.releaseVersion.outputs.releaseVersion }}" }'
103106

.github/workflows/spring-gradle-pull-request-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up JDK
1616
uses: actions/setup-java@v3
1717
with:
18-
distribution: adopt
18+
distribution: temurin
1919
java-version: 17
2020
cache: gradle
2121

.github/workflows/spring-maven-pull-request-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up JDK
1616
uses: actions/setup-java@v3
1717
with:
18-
distribution: adopt
18+
distribution: temurin
1919
java-version: 17
2020
cache: 'maven'
2121

0 commit comments

Comments
 (0)