From 915fe228c87b4a0f490db6140461151fb5bf1b0b Mon Sep 17 00:00:00 2001 From: xstefank Date: Mon, 20 Jan 2025 08:17:54 +0100 Subject: [PATCH] chore: move Quarkus platform PR info to the project.yml file Signed-off-by: xstefank --- .github/project.yml | 4 +- .../release-update-quarkus-platform.yml | 43 ++++--------------- 2 files changed, 11 insertions(+), 36 deletions(-) diff --git a/.github/project.yml b/.github/project.yml index bc881fae3..3d8b47d7f 100644 --- a/.github/project.yml +++ b/.github/project.yml @@ -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 diff --git a/.github/workflows/release-update-quarkus-platform.yml b/.github/workflows/release-update-quarkus-platform.yml index 6597fef2b..5d4b24fab 100644 --- a/.github/workflows/release-update-quarkus-platform.yml +++ b/.github/workflows/release-update-quarkus-platform.yml @@ -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