jamesnetherton commented on code in PR #4645:
URL: https://github.com/apache/camel-quarkus/pull/4645#discussion_r1135515870


##########
.github/workflows/ci-build.yaml:
##########
@@ -57,9 +57,74 @@ env:
   TESTCONTAINERS_RYUK_DISABLED: true
 
 jobs:
-  initial-mvn-install:
+  pre-build-checks:
     if: github.repository == 'apache/camel-quarkus'
     runs-on: ubuntu-latest
+    outputs:
+      continue-build: ${{ steps.pre-build-checks.outputs.continue-build }}
+      run-checks: ${{ steps.init.outputs.run-checks }}
+    steps:
+      - name: Initialize
+        id: init
+        run: |
+          if [[ "${{ github.event_name }}" == "pull_request" ]] && [[ "${{ 
github.actor }}" == "dependabot[bot]" ]]; then
+            echo "run-checks=true" >> $GITHUB_OUTPUT
+          else
+            echo "run-checks=false" >> $GITHUB_OUTPUT
+          fi
+      - name: Set up JDK 17
+        uses: actions/setup-java@v2
+        if: steps.init.outputs.run-checks == 'true'
+        with:
+          distribution: 'temurin'
+          java-version: '17'
+      - name: Checkout
+        uses: actions/checkout@v2
+        if: steps.init.outputs.run-checks == 'true'
+        with:
+          ref: ${{ github.head_ref }}
+          fetch-depth: 0
+      - name: Pre build checks
+        id: pre-build-checks
+        run: |
+          if [[ "${{ steps.init.outputs.run-checks }}" == "true" ]]; then
+            ./mvnw cq:sync-versions -N ${CQ_MAVEN_ARGS}
+            ./mvnw clean install -N ${CQ_MAVEN_ARGS}
+
+            cd poms
+            ../mvnw clean install -N ${CQ_MAVEN_ARGS}
+
+            cd bom
+            ../../mvnw process-resources -Dcq.flatten-bom.format --fail-never 
${CQ_MAVEN_ARGS}
+            ../../mvnw clean install ${CQ_MAVEN_ARGS}
+
+            cd ../../

Review Comment:
   I have reduced the number of required `mvnw` steps as suggested. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to