| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| name: Sync Camel Kafka Connector camel-master Branch |
| |
| on: |
| schedule: |
| # Run at 2 AM every day |
| - cron: '0 2 * * *' |
| jobs: |
| build: |
| name: Sync Camel Kafka Connector camel-master Branch |
| runs-on: ubuntu-latest |
| strategy: |
| matrix: |
| java: [ '11' ] |
| steps: |
| - name: Checkout Camel project |
| uses: actions/checkout@v2 |
| with: |
| repository: apache/camel |
| ref: master |
| path: camel |
| - name: Set Up Java |
| uses: actions/setup-java@v1 |
| with: |
| java-version: ${{ matrix.java }} |
| - name: Cache local Maven repository |
| uses: actions/cache@v2 |
| with: |
| path: ~/.m2/repository |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| restore-keys: | |
| ${{ runner.os }}-maven- |
| - name: Build Camel Project |
| run: ./mvnw -V --no-transfer-progress clean install -DskipTests |
| working-directory: ${{ github.workspace }}/camel |
| - name: Checkout camel-kafka-connector project |
| uses: actions/checkout@v2 |
| with: |
| ref: camel-master |
| fetch-depth: 0 |
| - name: Build Camel-kafka-connector Project |
| run: | |
| ./mvnw -V --no-transfer-progress -DskipTests --projects org.apache.camel.kafkaconnector:parent,org.apache.camel.kafkaconnector:camel-kafka-connector-aggregator,org.apache.camel.kafkaconnector:camel-buildtools clean install |
| ./mvnw -V --no-transfer-progress --projects org.apache.camel.kafkaconnector:camel-kafka-connector-generator-maven-plugin -Dcheckstyle.failOnViolation=true -Psourcecheck -DskipTests clean install |
| ./mvnw -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress --projects '!org.apache.camel.kafkaconnector:camel-kafka-connector-generator-maven-plugin' -Dcheckstyle.failOnViolation=true -Psourcecheck -DskipIntegrationTests=false clean test |
| - name: Create Pull Request |
| uses: peter-evans/create-pull-request@v2.4.1 |
| with: |
| token: ${{ secrets.GITHUB_TOKEN }} |
| branch: automatic-periodic-sync |
| title: '[Github Actions] Periodic Sync Camel-kafka-connector camel-master Branch' |
| body: | |
| Periodic Sync of Camel Kafka connector camel-master Branch with main Camel Master. |
| see https://github.com/apache/camel-kafka-connector/blob/master/.github/workflows/automatic-sync-camel-master.yml |