Skip to content

Commit ff2fd63

Browse files
committed
[RelEng] Multiple working-directories in Version-Increment workflow
And support the checkout of submodules, on request. Enable the versions within the 'eclipse.platform.releng' and 'eclipse.platform.common' directory in this repositories. The latter requires to checkout submodules.
1 parent 8de42c1 commit ff2fd63

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

.github/workflows/checkVersions.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,25 @@ on:
2222
required: false
2323
default: ''
2424
working-directory:
25-
description: Optional additional arguments to specify the directory in which maven build is executed
25+
description: Optional, comma-separated list of directories in which this version-check is executed
2626
type: string
2727
required: false
2828
default: '.'
29+
submodules:
30+
description: |
31+
Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules.
32+
When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are converted to HTTPS.
33+
The value is just passed as it is to the checkout action: https://github.com/actions/checkout#usage
34+
type: string
35+
required: false
36+
default: 'false'
2937

3038
permissions: {} # all none
3139

3240
env:
3341
MAVEN_ARGS: >-
3442
--batch-mode --no-transfer-progress
43+
WORKING_DIRECTORIES: ${{ inputs.working-directory }}
3544

3645
jobs:
3746
versions-check-and-increment:
@@ -42,6 +51,7 @@ jobs:
4251
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4352
with:
4453
fetch-depth: 0 # required for jgit timestamp provider to work
54+
submodules: ${{ inputs.submodules }}
4555

4656
- name: Set up Java
4757
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
@@ -73,11 +83,14 @@ jobs:
7383
with:
7484
attempt_delay: 200
7585
attempt_limit: 10
76-
current_path: ${{ inputs.working-directory }}
77-
command: >
78-
mvn verify ${{ inputs.extra-maven-args }} -DskipTests -Dcompare-version-with-baselines.skip=false
79-
org.eclipse.tycho:tycho-versions-plugin:bump-versions -Dtycho.bump-versions.increment=100
80-
--update-snapshots --threads 1C --fail-at-end --show-version
86+
command: |
87+
for dir in ${WORKING_DIRECTORIES//,/ }; do
88+
pushd $dir
89+
mvn verify ${{ inputs.extra-maven-args }} -DskipTests -Dcompare-version-with-baselines.skip=false \
90+
org.eclipse.tycho:tycho-versions-plugin:bump-versions -Dtycho.bump-versions.increment=100 \
91+
--update-snapshots --threads 1C --fail-at-end --show-version
92+
popd
93+
done
8194
8295
- name: Commit version increments, if any
8396
run: |
@@ -90,8 +103,8 @@ jobs:
90103
# Relevant files were staged, i.e. some version were changed
91104
92105
# Read 'releaseNumberSDK' property as stream version
93-
pushd ${{ inputs.working-directory }}
94-
mvn help:evaluate -Dexpression=releaseNumberSDK ${{ inputs.extra-maven-args }} --quiet '-Doutput=releaseNumberSDK-value.txt'
106+
pushd "${WORKING_DIRECTORIES%%,*}"
107+
mvn help:evaluate -Dexpression=releaseNumberSDK ${{ inputs.extra-maven-args }} --non-recursive --quiet -Doutput=releaseNumberSDK-value.txt
95108
streamVersion=$(<releaseNumberSDK-value.txt)
96109
rm -f releaseNumberSDK-value.txt
97110
popd

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ jobs:
2222
botName: Eclipse Platform Bot
2323
botMail: platform-bot@eclipse.org
2424
# Only check 'eclipse.platform.releng' projects
25-
working-directory: 'eclipse.platform.releng'
25+
working-directory: 'eclipse.platform.releng,eclipse.platform.common'
26+
submodules: 'true'
2627
extra-maven-args: '-Pbuild-individual-bundles'

0 commit comments

Comments
 (0)