Skip to content

Commit

Permalink
chore: move Quarkus platform PR info to the project.yml file
Browse files Browse the repository at this point in the history
Signed-off-by: xstefank <[email protected]>
  • Loading branch information
xstefank committed Jan 20, 2025
1 parent 119ed6e commit 915fe22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 36 deletions.
4 changes: 3 additions & 1 deletion .github/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ name: Java Operator SDK Extension
release:
current-version: 7.0.0.CR1
next-version: 7.0.0-SNAPSHOT

quarkus-platform:
target-branch: main
needs-main-pr: false
43 changes: 8 additions & 35 deletions .github/workflows/release-update-quarkus-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,44 +24,17 @@ jobs:

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

steps:
- uses: actions/checkout@v4
- uses: radcortez/project-metadata-action@main
name: Retrieve project metadata
id: metadata
with:
ref: ${{github.event.inputs.tag || github.ref_name}}

- name: Gather versions
id: versions
run: |
quarkus_version=$(./mvnw help:evaluate -Dexpression=quarkus.version -q -DforceStdout)
quarkus_major=$(echo ${quarkus_version} | cut -d . -f 1,2)
echo "QOSDK-defined Quarkus version: ${quarkus_version} (-> major: ${quarkus_major})"
quarkus_platform_version=$(curl -s https://registry.quarkus.io/client/platforms | jq -r '.platforms[0]."current-stream-id"')
echo "Current platform-defined Quarkus major version: ${quarkus_platform_version}"
quarkus_platform_branch=${quarkus_major}
if [ "${quarkus_major}" = "${quarkus_platform_version}" ]; then
quarkus_platform_branch="${quarkus_platform_version}"
fi
echo "quarkus_platform_branch=${quarkus_platform_branch}" >> $GITHUB_OUTPUT
if [ "${quarkus_platform_branch}" = "main" ]; then
echo "quarkus-platform update will target main"
echo "need_main_pr=true" >> $GITHUB_OUTPUT
else
echo "quarkus-platform update will target ${quarkus_platform_branch}"
echo "Check if quarkus-platform also needs to be updated on main"
if [ "${{ github.base_ref }}" = "main" ]; then
echo "PR targets main so assume quarkus-platform main also needs to be updated"
echo "need_main_pr=true" >> $GITHUB_OUTPUT
else
echo "No need for PR on quarkus-platform main"
echo "need_main_pr=false" >> $GITHUB_OUTPUT
fi
fi
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'
local-file: true

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

0 comments on commit 915fe22

Please sign in to comment.