Skip to content

Commit 2491cbf

Browse files
committed
Tweaking nightly build script
1 parent 47cdf1a commit 2491cbf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/daily-branch-verification.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ jobs:
2323
# List all branches except HEAD and remove origin/ prefix
2424
git fetch --all
2525
branches=$(git branch -r | grep -v '\->' | grep -v HEAD | grep 'origin/sample-code' | sed 's/origin\///')
26-
formatted_branches=$(echo $branches | tr '\n' ',' | sed 's/,$//')
27-
echo "formatted_branches=$formatted_branches" >> $GITHUB_ENV
26+
formatted_branches=$(echo $branches | jq -R -s -c 'split("\n") | map(select(. != ""))')
27+
echo "branches=$formatted_branches" >> $GITHUB_ENV
28+
echo "::set-output name=branches::$formatted_branches"
29+
echo "Branches: ${{ needs.get-branches.outputs.branches }}"
2830
2931
# Run Maven verify on each branch in parallel
3032
verify-branches:
@@ -40,6 +42,12 @@ jobs:
4042
ref: ${{ matrix.branch }}
4143
fetch-depth: 0
4244

45+
- name: Set up JDK 17
46+
uses: actions/setup-java@v3
47+
with:
48+
java-version: '17'
49+
distribution: 'adopt'
50+
4351
- name: Run Maven Verify
4452
run: |
4553
echo "Processing branch: ${{ matrix.branch }}"

0 commit comments

Comments
 (0)