Skip to content

Commit 915fe22

Browse files
committed
chore: move Quarkus platform PR info to the project.yml file
Signed-off-by: xstefank <xstefank122@gmail.com>
1 parent 119ed6e commit 915fe22

File tree

2 files changed

+11
-36
lines changed

2 files changed

+11
-36
lines changed

.github/project.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ name: Java Operator SDK Extension
22
release:
33
current-version: 7.0.0.CR1
44
next-version: 7.0.0-SNAPSHOT
5-
5+
quarkus-platform:
6+
target-branch: main
7+
needs-main-pr: false

.github/workflows/release-update-quarkus-platform.yml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,44 +24,17 @@ jobs:
2424

2525
outputs:
2626
released: ${{steps.wait-for-bom.outputs.published}}
27-
quarkus-platform-branch: ${{steps.versions.outputs.quarkus_platform_branch}}
28-
needs-main-pr: ${{ steps.versions.outputs.needs_main_pr == 'true' }}
27+
quarkus-platform-branch: ${{steps.metadata.outputs.target-branch}}
28+
needs-main-pr: ${{ steps.metadata.outputs.needs-main-pr == 'true' }}
2929

3030
steps:
31-
- uses: actions/checkout@v4
31+
- uses: radcortez/project-metadata-action@main
32+
name: Retrieve project metadata
33+
id: metadata
3234
with:
33-
ref: ${{github.event.inputs.tag || github.ref_name}}
34-
35-
- name: Gather versions
36-
id: versions
37-
run: |
38-
quarkus_version=$(./mvnw help:evaluate -Dexpression=quarkus.version -q -DforceStdout)
39-
quarkus_major=$(echo ${quarkus_version} | cut -d . -f 1,2)
40-
echo "QOSDK-defined Quarkus version: ${quarkus_version} (-> major: ${quarkus_major})"
41-
42-
quarkus_platform_version=$(curl -s https://registry.quarkus.io/client/platforms | jq -r '.platforms[0]."current-stream-id"')
43-
echo "Current platform-defined Quarkus major version: ${quarkus_platform_version}"
44-
45-
quarkus_platform_branch=${quarkus_major}
46-
if [ "${quarkus_major}" = "${quarkus_platform_version}" ]; then
47-
quarkus_platform_branch="${quarkus_platform_version}"
48-
fi
49-
echo "quarkus_platform_branch=${quarkus_platform_branch}" >> $GITHUB_OUTPUT
50-
51-
if [ "${quarkus_platform_branch}" = "main" ]; then
52-
echo "quarkus-platform update will target main"
53-
echo "need_main_pr=true" >> $GITHUB_OUTPUT
54-
else
55-
echo "quarkus-platform update will target ${quarkus_platform_branch}"
56-
echo "Check if quarkus-platform also needs to be updated on main"
57-
if [ "${{ github.base_ref }}" = "main" ]; then
58-
echo "PR targets main so assume quarkus-platform main also needs to be updated"
59-
echo "need_main_pr=true" >> $GITHUB_OUTPUT
60-
else
61-
echo "No need for PR on quarkus-platform main"
62-
echo "need_main_pr=false" >> $GITHUB_OUTPUT
63-
fi
64-
fi
35+
github-token: ${{secrets.GITHUB_TOKEN}}
36+
metadata-file-path: '.github/project.yml'
37+
local-file: true
6538

6639
- name: Wait for QOSDK BOM to be published
6740
uses: quarkusio/monitor-artifact-publication-action@main

0 commit comments

Comments
 (0)