You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/01/12 14:23:29 UTC

[camel] 03/06: (chores) ci: adjust the Push GH actions for Camel 3 and Camel 4

This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6402cdf24c1e098fbac85e4cbca06ab3ae922ece
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Jan 12 10:15:57 2023 +0100

    (chores) ci: adjust the Push GH actions for Camel 3 and Camel 4
---
 ...checkstyle-build.yml => push-build-camel-3.yml} | 51 ++++++++++++++++------
 .../{main-push-build.yml => push-build-main.yml}   |  4 +-
 2 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/main-checkstyle-build.yml b/.github/workflows/push-build-camel-3.yml
similarity index 50%
rename from .github/workflows/main-checkstyle-build.yml
rename to .github/workflows/push-build-camel-3.yml
index 47ea9b4803e..a75953c3146 100644
--- a/.github/workflows/main-checkstyle-build.yml
+++ b/.github/workflows/push-build-camel-3.yml
@@ -15,21 +15,28 @@
 # limitations under the License.
 #
 
-name: checkstyle build
+name: Reformat and Build (Camel 3.x)
 
 on:
-  schedule:
-# Every 5th minute every 3 hours during working days
-    - cron: '5 */3 * * 1-5'
-# Every 6 hours during weekends ... we don't want to be flooded with emails
-    - cron: '30 */6 * * 6,0'
-
-permissions:
-  contents: read # to fetch code (actions/checkout)
+  push:
+    branches:
+      - camel-3.x
+    paths-ignore:
+      - .github/**/*
+      - README.md
+      - SECURITY.md
+      - Jenkinsfile
+      - Jenkinsfile.*
+      - NOTICE.txt
 
+permissions: {}
 jobs:
   build:
     if: github.repository == 'apache/camel'
+    permissions:
+      contents: write # to create branch (peter-evans/create-pull-request)
+      pull-requests: write # to create a PR (peter-evans/create-pull-request)
+
     runs-on: ubuntu-latest
     strategy:
       matrix:
@@ -46,11 +53,29 @@ jobs:
           distribution: 'temurin'
           java-version: ${{ matrix.java }}
           cache: 'maven'
-      - name: mvn sourcecheck
-        run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -l checkstyle.log -Dmvnd.threads=2 -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress -Psourcecheck -Dcheckstyle.failOnViolation=true -e -DskipTests checkstyle:checkstyle verify
+      - name: mvn formatter and build
+        run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -l build.log -Dmvnd.threads=2 -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress -e -Pformat,fastinstall -DskipTests verify
       - name: archive logs
         uses: actions/upload-artifact@v3
         if: always()
         with:
-          name: checkstyle.log
-          path: checkstyle.log
+          name: build.log
+          path: build.log
+      - name: Create Pull Request
+        uses: peter-evans/create-pull-request@v4
+        with:
+          base: camel-3.x
+          token: ${{ secrets.GITHUB_TOKEN }}
+          commit-message: "Regen for commit ${{ github.sha }}"
+          committer: GitHub <no...@github.com>
+          author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
+          signoff: true
+          branch: regen_bot
+          title: "Generated sources regen"
+          body: |
+            Regen bot :robot: found some uncommitted changes after running build on :camel: main.
+            Please do not delete `regen_bot` branch after merge/rebase.
+          labels: |
+            regen
+            automated pr
+          assignees: oscerd
diff --git a/.github/workflows/main-push-build.yml b/.github/workflows/push-build-main.yml
similarity index 98%
rename from .github/workflows/main-push-build.yml
rename to .github/workflows/push-build-main.yml
index 9144649e1e1..b1a2ec4a35a 100644
--- a/.github/workflows/main-push-build.yml
+++ b/.github/workflows/push-build-main.yml
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-name: reformat and build
+name: Reformat and Build (Camel 4)
 
 on:
   push:
@@ -40,7 +40,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        java: [ '11' ]
+        java: [ '17' ]
     steps:
       - uses: actions/checkout@v3
         with: