Quarkus Next #615
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Quarkus Next | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| concurrency: | |
| # Only cancel jobs for PR updates | |
| group: quarkus-next-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| # Quarkus branch to build snapshots from. Update when quarkus-next should track a different release stream. | |
| QUARKUS_BRANCH: 3.x | |
| jobs: | |
| build-quarkus-snapshot: | |
| name: Build Quarkus snapshot | |
| if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| quarkus-version: ${{ steps.quarkus-version.outputs.version }} | |
| qosdk-version: ${{ steps.qosdk-version.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| repository: quarkusio/quarkus | |
| ref: ${{ env.QUARKUS_BRANCH }} | |
| path: quarkus | |
| - name: Extract Quarkus snapshot version | |
| id: quarkus-version | |
| run: | | |
| version=$(grep -m1 '<version>' quarkus/pom.xml | sed 's/.*<version>\(.*\)<\/version>.*/\1/') | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| repository: quarkiverse/quarkus-operator-sdk | |
| ref: main | |
| path: quarkus-operator-sdk | |
| # JDK 17 to match how Quarkus and QOSDK build and publish their own snapshots | |
| - name: Setup Java | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Key for daily rotation of cache | |
| id: cache-key | |
| run: echo "date=$(date -u +%Y-%m-%d)" >> $GITHUB_OUTPUT | |
| - name: Quarkus snapshot cache | |
| id: quarkus-cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.m2/repository/io/quarkus | |
| ~/.m2/repository/io/quarkiverse/operatorsdk | |
| key: quarkus-snapshot-${{ env.QUARKUS_BRANCH }}-${{ steps.cache-key.outputs.date }} | |
| enableCrossOsArchive: true | |
| - name: Build Quarkus snapshot | |
| if: steps.quarkus-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd quarkus | |
| ./mvnw -B -e --no-transfer-progress \ | |
| -Dquickly -Dno-test-modules -Prelocations \ | |
| clean install | |
| - name: Build Quarkus Operator SDK snapshot | |
| if: steps.quarkus-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd quarkus-operator-sdk | |
| ./mvnw -B -e --no-transfer-progress \ | |
| clean install -DskipTests -DskipITs -DskipDocs \ | |
| -Dquarkus.version=${{ steps.quarkus-version.outputs.version }} | |
| - name: Extract QOSDK version | |
| id: qosdk-version | |
| run: | | |
| version=$(ls ~/.m2/repository/io/quarkiverse/operatorsdk/quarkus-operator-sdk-bom/ | grep -E '.*-SNAPSHOT$' | head -1) | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| update-quarkus-next-branch: | |
| name: Update quarkus-next branch | |
| runs-on: ubuntu-latest | |
| needs: build-quarkus-snapshot | |
| permissions: | |
| contents: write # Required to push changes to the repository | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| - name: Setup Java | |
| uses: ./.github/actions/java-setup | |
| - name: Restore Quarkus snapshot cache | |
| uses: ./.github/actions/quarkus-snapshot-cache | |
| - name: Configure Git | |
| run: | | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| - name: Cherry-pick additional commits in quarkus-next | |
| env: | |
| QUARKUS_VERSION: ${{ needs.build-quarkus-snapshot.outputs.quarkus-version }} | |
| QOSDK_VERSION: ${{ needs.build-quarkus-snapshot.outputs.qosdk-version }} | |
| run: | | |
| ${GITHUB_WORKSPACE}/.github/scripts/prepare-quarkus-next.sh | |
| - name: Push changes | |
| run: | | |
| git push -f origin HEAD:quarkus-next | |
| run-matrix-with-quarkus-next: | |
| name: Run workflow matrix with the quarkus-next branch | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write # Required to trigger workflows using gh | |
| needs: | |
| - update-quarkus-next-branch | |
| strategy: | |
| matrix: | |
| workflow: | |
| - ci.yml | |
| - operator-ci.yml | |
| steps: | |
| - name: Run workflow with the nightly Quarkus release | |
| run: gh workflow run -R ${{ github.repository }} ${{ matrix.workflow }} -r quarkus-next | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |