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

lukaszlenart pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/struts-examples.git

commit 47ae6d42dc5cae7edc2ae3a07c3ad72511054fe9
Author: Lukasz Lenart <[email protected]>
AuthorDate: Thu Oct 13 07:23:31 2022 +0200

    Introduces GH Actions CI
---
 .github/dependabot.yml      | 22 +++++++++++++----
 .github/workflows/maven.yml | 57 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 4 deletions(-)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index a3b16b8..7ad736a 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,11 +1,25 @@
-# Basic dependabot.yml file with
-# minimum configuration for maven package manager
+# 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.
 
 version: 2
 updates:
-  # Enable version updates for Maven
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "weekly"
   - package-ecosystem: "maven"
     directory: "/"
-    # Check for updates once a week
     schedule:
       interval: "weekly"
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..a05d2ba
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,57 @@
+# 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: Java CI
+
+on:
+  pull_request:
+  push:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        java: [ '8', '11', '17' ]
+    steps:
+      - name: Checkout code
+        uses: actions/[email protected]
+      - name: Set up cache
+        uses: actions/[email protected]
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v3
+        with:
+          distribution: adopt
+          java-version: ${{ matrix.java }}
+      - name: Build with Maven on Java ${{ matrix.java }}
+        run: mvn -B -V test --no-transfer-progress
+      - name: Apply automerge label
+        if: matrix.java == '17' && github.actor == 'dependabot[bot]'
+        run: gh pr edit "$PR_URL" --add-label "automerge"
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          PR_URL: ${{ github.event.pull_request.html_url }}
+      - name: Automerge
+        if: matrix.java == '17' && github.actor == 'dependabot[bot]'
+        uses: pascalgn/[email protected]
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Reply via email to